Bir müşteriye bot yazacağımda linklerin kısaltıldığını farkettim bunun için ufak birşey yazmıştım. Umarım sizinde işinize yarar.
index.php
c.php
$linktl = $_POST['url'];
function baglanamca($site)
{
$ch = curl_init();
$hc = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.0.11172 Safari/537.36";
curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com');
curl_setopt($ch, CURLOPT_URL, $site);
curl_setopt($ch, CURLOPT_USERAGENT, $hc);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$site = curl_exec($ch);
curl_close($ch);
preg_match_all('@href\|(.*?)\|@si',$site,$lolo);
$linkid = $lolo[1][0];
$ch = curl_init();
$hc = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.0.11172 Safari/537.36";
curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com');
curl_setopt($ch, CURLOPT_URL, 'http://link.tl/fly/index4.php?lid='.$linkid);
curl_setopt($ch, CURLOPT_USERAGENT, $hc);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$site = curl_exec($ch);
curl_close($ch);
preg_match_all('@accept-charset="UTF-8"(.*?)target@si',$site,$lili);
$linkim2 = $lili[1][0];
preg_match_all('@ echo $lilili[1][0];
}
$coz = baglanamca($linktl);
echo '
?>
Demo: http://phpside.com/demo/linktl/