`
runthu
  • 浏览: 42282 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
社区版块
存档分类
最新评论

php curl 读取网页

PHP 
阅读更多

<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.baidu.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
$output = curl_exec($ch);
curl_close($ch);

echo $output;

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics