php抓取URL网址跳转后的网址
$url = "https://***/e/DownSys/doaction.php?enews=".$_GET["enews"]."&classid=".$_GET["classid"]."&id=".$_GET["id"]."&pathid=".$_GET["pathid"]."&pass=".$_GET["pass"]."&p=".$_GET["p"]."";
//$url = 'http://www.baidu.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_NOBODY, 1);// 不需要页面内容
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);// 不直接输出
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// 返回最后的Location
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');//有时需要这个功能
curl_setopt($ch, CURLOPT_MAXREDIRS, 1);//限定只能抓取跳转3次以内的网址
curl_exec($ch);
$info = curl_getinfo($ch,CURLINFO_EFFECTIVE_URL);
curl_close($ch);
echo "<ok>".$info."<okk>";
echo "<shibai>".$url."<shibaile>";