0
我寫了一個程序自動縮短的鏈接,並使用它自己的網站 的API,但我不得不當我點擊一個鏈接縮短(像:goo.gle/~~~ )這個程序不使用我的服務,並重定向與出Reshorten鏈接鏈接! 正如你所知道的shortner鏈接服務更改網址 現在我需要一個程序,如果發現我的價值,像(goo.gle)內容則不論Reshorten服務,並使用API重定向用了縮短鏈接的網址有些
elseif ($url == "http://goo.gle/")
{
header("HTTP/1.1 301 Moved Permanently");
header("Location: $url");
}
else
{
$orls = "http://losa.net/api.php?key=dc4c0b38b62b44f69467c33eaf7ce08b&uid=128&adtype=int&url=".$url."";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$orls);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$content=curl_exec ($ch);
curl_close ($ch);
header("HTTP/1.1 301 Moved Permanently");
header("Location: $content");
}