3.
@读书顶个鸟用,你可以修改一下试试,<?php
@set_time_limit(0);
$p=
@file_get_contents("p.txt");
if($p==0 or $p==''){$p=1;}
$pa=file_get_contents("
http://m.kxin.cc/new.asp?page=$p");
preg_match_all('/view\.asp\?id=(\d+)\">(.*)<\/a>/',$pa,$re);
//print_r($re);
for($i=0;$i<20;$i++){
$id=$re[1][$i];
$name=$re[2][$i];
$u="
http://m.kxin.cc/view.asp?id={$id}";
$f=file_get_contents($u);
$tt=explode('<br/><br/>',$f);
$tt=explode('送',$tt[1]);
//print_r($tt);
$nr=str_replace(array("<br/>"),array(""),$tt[0]);
$nr=strip_tags($nr);
$t=$nr;
//echo $nr;
$nr="#{$name}#–––"."{$nr}"."––––––––––––––––分割线––––––––––––––––"."\n";
$ff=fopen("joke.txt","a+");
$fi=file_get_contents("joke.txt");
if(!strstr($fi,$t) and $t and !strstr($t,'免费下载图片')){
fwrite($ff,$nr);}
fclose($ff);
}
$pi=$p+1;
file_put_contents("p.txt",$pi);
?>
5.
@残酷,元旦我好好看看采集,主要是处理源站更新时要好好考虑