您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php采集中国代理服务器网的方法,采集中国_PHP教程

2026/1/27 4:58:43发布12次查看
php采集中国代理服务器网的方法,采集中国本文实例讲述了php采集中国代理服务器网的方法。分享给大家供大家参考。具体如下:
list = preg_replace('/\(\*\)/', $page, $url); return $this->list; } /* 采集代理内容 */ function get($page) { $this->get_list($page); $file = stripslashes(file_get_contents($this->list)); $zz = '/([0-9\.]+)document\.write\(:([\+a-z]+)\)[\w]+[\w\,]+/is'; preg_match_all($zz, $file, $temp); unset($temp[0]); $th = array('z', 'm', 'k', 'l', 'd', 'x', 'i', 'w', 'q', 'b'); $th2 = array(3, 4, 2, 9, 0, 5, 7, 6, 8, 1); foreach ($temp[2] as $k=>$v) { $v = preg_replace(/[\+]+/, '', $v); $s = str_replace($th, $th2, $v); $re .= $temp[1][$k] . ':' . $s . \r\n; } $this->save($re); return true; } /* 保存 */ function save($re) { return file_put_contents($this->save_path, $re, file_append); } /* 读取 */ function read() { return file_get_contents($this->save_path); }}// 初始化采集类$p = new proxy;$start = 1;$end = 10;// 控制if($_get['a'] == 'start') { echo '正在发送采集请求'; echo '';} elseif(isset($_get['p'])) { $i = $_get['p']++; if($i >= $end+1) { exit(''); } else { echo '正在请求列表 '. $i .' > '. $end; if($p->get($i)) { echo ''; } }} elseif($_get['a'] == 'end') { echo '采集完毕';} else { echo ' ';}?>
希望本文所述对大家的php程序设计有所帮助。
http://www.bkjia.com/phpjc/1017887.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/1017887.htmltecharticlephp采集中国代理服务器网的方法,采集中国 本文实例讲述了php采集中国代理服务器网的方法。分享给大家供大家参考。具体如下: php/**...
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product