时间:2021-07-01 10:21:17 帮助过:17人阅读
function curl_file_get_contents($durl){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $durl); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $r = curl_exec($ch); //$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); return $r; }