< ?php
// tinyurl.php?c=
$num = $_GET['c'];
if($fp = fsockopen ("tinyurl.com", 80, $errno, $errstr, 30))
{
if ($fp) {
fputs ($fp, "HEAD /$num HTTP/1.0\r\nHost: tinyurl.com\r\n\r\n");
while (!feof($fp)) {$headers .= fgets ($fp,128);}
fclose ($fp);
}
$arr1=explode("Location:",$headers);
$arr=explode("\n",trim($arr1[1]));
echo trim($arr[0]);
}
?>
You need to create an account or log in to post comments to this site.