Home >php教程 >PHP源码 >实用PHP网页抓取

实用PHP网页抓取

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-08 17:32:311091browse
<script>ec(2);</script>



  PHP 网页抓取测试


Hello World!''; ?>






sssss

ooooo


 

 

 



实用抓取网页内容测试



$url = ''http://localhost/test.php''; //测试本地网页
#$url = ''http://www.myenjoylife.cn/index.php''; //抓取www.myenjoylife.cn首页内容
$lines_array = file($url);
$lines_string = implode('''', $lines_array);
eregi("(.*)", $lines_string, $head);
echo $head[0];
?>

 

http://blog.111cn.net/hongyu6/archive/2008/03/11/2170585.aspx



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php+Smarty的缓存操作Next article:在PHP中加密