永发信息网

想用php写一个采集的页面,高手指导一下!

答案:5  悬赏:80  手机版
解决时间 2021-03-18 20:45
  • 提问者网友:戎马万世
  • 2021-03-17 21:34
就写了这两句,还出错了
<?php
$url=file_get_contents("http://www.baidu.com");

Echo $url;
?>

Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/public_html/cx/index.php on line 2 Warning: file_get_contents(http://www.baidu.com): failed to open stream: no suitable wrapper could be found in /home/public_html/cx/index.php on line 2
最佳答案
  • 五星知识达人网友:一把行者刀
  • 2021-03-17 22:59
正好最近我写了一套采集的程序。采集的原理主要分抓取和分析匹配。抓取可以使用curl或者file_get_contents函数。分析则使用正则表达式。
全部回答
  • 1楼网友:逐風
  • 2021-03-18 01:54
这是服务器关闭了file_get_contents 功能
  • 2楼网友:未来江山和你
  • 2021-03-18 01:14
可是默认模版少文件,把默认模版里的文件重传一次应该就好了...
  • 3楼网友:话散在刀尖上
  • 2021-03-18 00:27
有个叫php snoopy的插件。你百度下就能找到。网上也有不少使用方法。简单易用
  • 4楼网友:夜余生
  • 2021-03-17 23:42
可以用curl采集内容
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯