libcrawl v2

2018年04月06日 4377点热度 0人点赞 0条评论

[title]简介[/title]

主要功能 爬取个人信息

项目地址 github.com/kamino-space/opacrawl

当前版本 v2.0

运行环境 PHP+MYSQL

[title]适用范围[/title]

huiwen opac v5.5(原版验证码)

[title]为何要做这个?[/title]

[title]使用项目[/title]

[title]示例[/title]

<?php
require_once __DIR__ . "/libcrawl.php";
$work = new libcrawl( "http://address:port" );
//save log /tmp/log.txt default: true
$work->log = true;
//save data to db default: true
$work->save = true;
//delay continue (s) default: null
$work->sleep = 5;
//single work
$work->singleWork( "11111", "name" );
//database
$db = array(
	"host"   => "xxx.xxx.xxx.xxx",
	"user"   => "root",
	"passwd" => "*******",
	"dbname" => "test",
	"table"  => "demo"
);
$work->setDb( $db );
//multi work
$list = array(
	array(
		"sid"  => "111111",
		"name" => "name1"
	),
	array(
		"sid"  => "22222",
		"name" => "name2"
	)
);
$work->setList( $list );
$work->multiWork();

 

AIKAMINO

暂无