时间:2021-07-01 10:21:17 帮助过:4人阅读
$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;