ApplicationDie('error: no link id specified'); } $link = new clsLink($id); $link->debuglevel = 0; $link->ClearCacheData(); $link->Increment("hits", true); $url = $link->Get("Url"); // $protocol = 'http'; if (preg_match('/^(http|ftp|mailto:)(.*)/U', $url)) { header('Location: '.$url); } else { header('Location: http://'.$url); } exit; ?>