目前我使用SIMPLE_HTML_DOM来废弃一些信息。我做了几个网站,但有一个我有一个问题。看看这个网站:'http://www.prawo.uwb.edu.pl/prawo_new/news.php'当我使用:
$url = 'http://www.prawo.uwb.edu.pl/prawo_new/news.php';
file_get_html($url);
我得到
打开流失败:没有这样的文件或目录/simple_html_dom.php第75行
,但我也检查了这个网站www.import.io页面和工作良好。我读过urlencode()
,但没有成功。
Thanks for advance
我尝试用curl方式描述这个解决方案和函数
get_web_page
为我工作:)
在您的案例中,$url
is -是指向某个页面的链接。
此函数需要使用系统路径。
使用上下文参数从网页的url获取内容。
的例子:
$opts = array(
'http' => array(
'method' => 'GET',
'header' => 'Accept-language: en'r'n'
)
);
$context = stream_context_create($opts);
$file = file_get_contents('http://your.site/', false, $context);