誰能用curl或file_get_contents擷取這個網頁的內容?
http://zhaohongen.fu.cn8u.cn/v.html
如果能請不方法告訴我,不勝感激!!
------解決方案--------------------
他這是有一個點擊後的跳轉,不是自己寫了個header跳轉.
看了一下代碼 其實就是掩人耳目
使用curl來訪問。只需要 第一次訪問這個頁面儲存好cookie 再重新整理一次頁面 帶上cookie 即可.
完全使用cookie 來控制,試我就不試了
你可以在瀏覽器先開啟 http://zhaohongen.fu.cn8u.cn/v.html 再開啟一個tab 然後訪問 http://zhaohongen.fu.cn8u.cn/v.html
內容就出來了,清除掉cookie 就又不行了 又得重複上面我說的步驟,所以只要控制了cookie就可以了
------解決方案--------------------
真糾結,,妞妞都說了,cookie問題
PHP code
$cookie_file = dirname(__FILE__).'/cookie.txt';if(!file_exists($cookie_file)){ $fp= fopen($cookie_file,"w"); fclose($fp);}$url = "http://zhaohongen.fu.cn8u.cn/v.html";$ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file); curl_exec($ch);curl_close($ch);$url = "http://zhaohongen.fu.cn8u.cn/v.html";$ch = curl_init($url);curl_setopt($ch, CURLOPT_HEADER, 0);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file); $response = curl_exec($ch);curl_close($ch);echo $response;