//curl函数$file2 = GetSources($url2,$User_Agent,$Referer_Url); function GetSources($Url,$User_Agent='',$Referer_Url='',$proxy) { $ch = curl_init(); curl_setopt ($ch, CURLOPT_PROXY, $proxy); curl_setopt($ch, CURLOPT_TIMEOUT,5); curl_setopt ($ch, CURLOPT_URL, $Url); curl_setopt ($ch, CURLOPT_USERAGENT, $User_Agent); curl_setopt ($ch, CURLOPT_REFERER, $Referer_Url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $MySources = curl_exec ($ch); curl_close($ch); return $MySources; }