$url='http://www.tudou.com/a/OpofdZOE_mI/&iid=131686432&resourceId=0_04_05_99/v.swf';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_exec($ch);$response = curl_exec($ch);preg_match_all('/^Location:(.*)$/mi', $response, $matches);
curl_close($ch);echo !empty($matches[1]) ? trim($matches[1][0]) : 'No redirect found';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_exec($ch);$response = curl_exec($ch);preg_match_all('/^Location:(.*)$/mi', $response, $matches);
curl_close($ch);echo !empty($matches[1]) ? trim($matches[1][0]) : 'No redirect found';
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货