php使用file_get_contents函数抓取页面信息
php使用file_get_contents函数抓取页面信息 [代码片段(6行)]
$url="http://outofmemory.cn
$contents=@file_get_contents($url);
//preg_match_all("/<p class=\\"right forumcount\\">(.*?)<\\/p>/is",$contents,$content);
preg_match_all("/<h3>(.*?)<\\/h3>/is",$contents,$content);
print_r($content[0]);
//该片段来自于http://outofmemory.cn
- 上一篇:php 图片地址处理
- 下一篇:php 获取MongoDB数据大小
精彩图集
精彩文章






