码迷,mamicode.com
首页 > Web开发 > 详细

php如何抓取网页

时间:2015-03-01 18:22:58      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:

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如何抓取网页

标签:

原文地址:http://www.cnblogs.com/python001/p/4307317.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!