/ Published in: Other
Expand |
Embed | Plain Text
<? $path = './'; include($path.'includes/header.inc.php'); $url = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://"; if ($_SERVER["SERVER_PORT"] != "80"){ $url .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $url .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } $db = new sql; $db->query("select * from items where old_url='".$url."'"); if($db->num_rows()==1){ $row = $db->fetch_array(); $item = new item; $item->Get_Item($row["id"]); $gogogo = $item->url; } else { $gogogo = SITE_URL; } header("Location: ".$gogogo); exit; ?>
You need to login to post a comment.
