(.*?)/',$this->content,$files); //取标题
$filename=$files[1][0].".html"; //存储名
$content=$this->str_cut($this->content,'http://pagead2.googlesyndication.com/pagead/show_ads.js','');
$file=fopen($filename,"w");
fwrite($file,$content);
fclose($file);
echo $filename."保存 OK
\n";
}
}
function str_cut($str ,$start, $end) {
$content = strstr( $str, $start );
$content = substr( $content, strlen( $start ), strpos( $content, $end ) - strlen( $start ) );
return $content;
}
}
$w=new GetUrl("http://www.ijavascript.cn/jiaocheng/javascript-jiaocheng-352.html");
?>
http://www.bkjia.com/PHPjc/321035.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/321035.htmlTechArticle参考别人想法变成自己的想法,你会发现慢慢下来以后你就拥有了临时解决很多问题的思路与方法。 复制代码 代码如下: ?php /* 功能:获取页...