php如何抓取网页
<?php
$url = "http://www.pc100.net";
$contents = file_get_contents($url);
//如果出现中文乱码使用下面代码
//$getcontent = iconv("gb2312", "utf-8",$contents);
echo $contents;
?>
来自: http://www.thinkphp.cn/topic/28229.html
<?php
$url = "http://www.pc100.net";
$contents = file_get_contents($url);
//如果出现中文乱码使用下面代码
//$getcontent = iconv("gb2312", "utf-8",$contents);
echo $contents;
?>
来自: http://www.thinkphp.cn/topic/28229.html