嗨,我有我想要的捲曲度解析,在這裏域是這樣:cUrl作者:不含http域:// WWW
當我在域http://register.metsad.ee/avalik/info_teatis.php?too_id=2942704201
去重定向我[ register.metsad.ee/avalik/info_teatis.php?too_id=2942704201]
它沒有http:// www。 代碼我用它來解析是:
function get_data($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$src = 'http://register.metsad.ee/avalik/info_teatis.php?too_id=2942704201';
然後$c = get_data($src); echo $c;
對於resoult我得到一個空白頁。我也試圖與Simple_Html_Dom解析器是這樣的:
echo file_get_html($src)->plaintext;
但我仍得到一個空白頁。當我TRIE不含http解析://再有就是
Warning: file_get_contents(register.metsad.ee/avalik/info_teatis.php?too_id=2942704201) [function.file-get-contents]: failed to open stream: Result too large in C:\xampp\htdocs\Trash\metsakontroll\system\c_simple_html_dom.php on line 70
cUrl作者還提供了白色畫面,沒有效果的錯誤。當我試圖解析它像這樣的文件夾:
http://www.metsad.ee/register/avalik/info_teatis.php?too_id=2942704201然後服務器說未找到
我找遍了整個互聯網= /任何想法如何通過捲曲或Simple_html_dom閱讀網頁?
試'http://register.metsad.ee/avalik/info_teatis.php?too_id = 2942704201' –
我得到空白的白色屏幕導致它沒有重定向=( 編輯:如果我捲曲頭,然後我得到這個 HTTP/1.1 200 OK日期:星期四,2012年12月13日20點12分27秒格林尼治標準時間服務器:Apache的Content-Length:0的Content-Type:text/html的;字符集= UTF-8 這意味着它連接到服務器,但作爲文件長度爲0,它返回我一個空白頁,它不會重定向到地址,而HTTP:// –