Manchmal möchte man das Ziel eines gekürzten Linkes wissen ohne drauf zu klicken.
Für diese Zwecke habe ein kleines Script geschrieben:
<html>
<head>
<title>Link Unshrink</title>
</head>
<body>
<form action = "<?php $_SERVER['SCRIPT_NAME'] ?>" Method = "POST">
<input type = "Text" Name = "adresse">
<input type = "Submit" Value = "Check die Adresse">
</form>
<?php
error_reporting(0);
if( $_POST['adresse'] )
{
if(!(substr($_POST['adresse'], 0, 4) == "http" ))
$url = "http://" . htmlentities($_POST['adresse']);
else
$url = htmlentities($_POST['adresse']);
$info = get_headers($url);
for( $i = 0; $i < count($info); $i++ )
{
if( preg_match("/location:/i",$info[$i]))
$location=$info[$i];
}
if(strlen($location) == 0) echo "Keine Location!";
else echo $location;
}
?>
</body>
</html>