1 Star 2 Fork 0

田园书生/WDScanner

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
taskspider.php 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
tidesec 提交于 2019-02-13 13:15 . Update code
<?php
require(dirname(__FILE__).'/include/config.inc.php');
#print "ok1";
global $db;
$sql = "select * from spider where check_status='new' or check_status='ing'";
$results = $db->query($sql);
if (mysql_num_rows($results) > 0){
$i = 1;
while ($fs = $db->fetch_array($results))
{
$url = $fs['url'];
$siteuser = $fs['siteuser'];
$sitepwd = $fs['sitepwd'];
$hash = $fs['hash'];
$check_status = $fs['check_status'];
if ( $check_status =='ing' ) {
$get_hash = $hash;
if (!empty($get_hash)) {
$url = "http://127.0.0.1/filespider.php?p=$get_hash";
// echo $url;
//check_url($url, $get_hash);
$spider_data = file_get_contents($url);
if ($spider_data != 'null'){
check_url($url, $get_hash);
}else if ($spider_data == 'null'){
//print "aa";
continue;
}
}
}else if ( $check_status =='new' ){
$up_arr['check_status'] = 'ing';
//$hash = '4fd615f4a8c0eb8e7889a003587ae222';
$sql1 = "select url_all,url from spider where hash = '$hash'";
$results1 = $db->query($sql1);
echo $hash."<br>";
if (mysql_num_rows($results1) > 0){
while ($fs1 = $db->fetch_array($results1)){
echo $fs1[1]."<br>".$fs1[0];
if ($fs1[0] = '<br>'){
echo $fs1[1];
}
}
}
$update = $db->update('spider',$up_arr,"hash='{$hash}'");
exit(0);
}
}
}
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/tyss521/WDScanner.git
git@gitee.com:tyss521/WDScanner.git
tyss521
WDScanner
WDScanner
master

搜索帮助