store the url's in database, and create a
redirect.php
and check the value with GET:
<?
function selecturl($value)
{
$hostname="***";
$user="***";
$pass="****";
$dbase="***";$connection=mysql_connect("$hostname","$user","$pass");
$db=mysql_select_db($dbase,$connection);
$sql="select url FROM sites WHERE id=". int($value)." LIMIT 1";
$result=mysql_query($sql);
if (mysql_num_rows($result)>0)
{
$row=mysql_fetch_assoc($result);
// insrt_statistics($value,2,4,4,1);
return($row["url"]);
}
else
return(false);
}
if(isset($_GET["u"]))
{
if(selecturl($_GET["u"]))
header("Location: ".selecturl($_GET["u"]));
else
print "No result";
?>
And i attached a simple dtaabase and php to make it.