如何获取一个网址跳转后的地址?
如:http://s.click.taobao.com/t?e=m%3D2%26s%3DYiJz231K878cQipKwQzePOeEDrYVVa64K7Vc7tFgwiFRAdhuF14FMXNqXXOUZuFRlovu%2FCElQOv6KEOZrBczXkKQIyb6a3ytqFkRdDwqYqPEwTsG41P5gZRWH38H64HnomfkDJRs%2BhU%3D&unid=41Tr3
这个地址打开后浏览器上显示的真实地址是
http://re.taobao.com/eauction?e=%2BxVQEg64bTgjmraEDZVrLivdVbwI2XBiHXoLCLLzzT6LltG5xFicOcdl4%2FC0GneLDPIwxrc30rgOiisYMpl%2Fi6dkxT%2BbrdGaTV8QlbynBnOSNCUsC%2FYwFNN0cMjbIKmK&ptype=100010&unid=41Tr3&from=basic&ali_trackid=2:mm_16674950_0_0,41Tr3:1386652869_6k2_781266833
如何用php获得这个真实地址呢(模拟访问获取也可以的)
获取到下面这一步就死了
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<script type='text/javascript'>
function htmlspecialchars(str){
str = str.replace(/</g, '<');
str = str.replace(/>/g, '>');
str = str.replace(/"/g, '"');
str = str.replace(/'/g, ''');
return str;
}
function bol(){
if (top.location != self.location) {
return false;
}
var qs = location.search.split("?")[location.search.split("?").length-1].split("&");
qso = {};
for (var i=0; i<qs.length; i++){
if (qs[i]!="") {
var tmpa = qs[i].split("=");
qso[tmpa[0]] = tmpa[1] ? tmpa[1] : "";
}
}
var tu = unescape(qso.tu);
if (htmlspecialchars(tu).length != tu.length) {
exit;
}
if (qso.tu && (qso.tu.indexOf("http%3A%2F%2Fs.click.taobao.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fi.click.taobao.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fs.click.alimama.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fitem8.taobao.com%2F")===0
|| qso.tu.indexOf("http%3A%2F%2Fshop8.taobao.com%2F")===0)) {
if (!window.attachEvent) {
document.write('<input style="display:none" type="button" id="exe" value="" onclick="window.location=\''+unescape(qso.tu)+'\'">');
document.getElementById('exe').click();
} else {
&nbs