Who can use curl or file_get_contents to retrieve the content of this webpage? Zhaohongen.fu.cn8u.cnv.html. if you can, please do not tell me the method. thank you !! ------ Solution ------------------ This is a jump after a click, rather than writing a header jump by yourself. after reading the code, it is actually a visit using curl. Who can use curl or file_get_contents to retrieve the content of this webpage?
Http://zhaohongen.fu.cn8u.cn/v.html
If you can, please do not tell me. thank you !!
------ Solution --------------------
This is a jump after a click, not a header jump.
After reading the code, you can hide your ears and ears.
Use curl for access. You only need to access this page for the first time to save the cookie and then refresh the page with the cookie.
The cookie is used completely for control, so I will not try it.
You can open the http://zhaohongen.fu.cn8u.cn/v.html in the browser, open a tab, and then access the http://zhaohongen.fu.cn8u.cn/v.html
The content is displayed, and the cookie is cleared, and the above steps have to be repeated. Therefore, you only need to control the cookie.
------ Solution --------------------
It's really hard to figure out. Niu said, cookie problems.
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;