curl_setopt ($ch, CURLOPT_URL, $url);curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($ch, CURLOPT_TIMEOUT, $timeout);//CURLOPT_CONNECTTIMEOUTcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);//使用IPV4curl_getinfo($ch, CURLINFO_HTTP_CODE);$file_contents = curl_exec($ch);$curl_code = curl_getinfo($ch, CURLINFO_HTTP_CODE
评论