<?php 
include("sql/conn.php"); 
$iipp = $_SERVER["REMOTE_ADDR"];
$noww = time();
$y = date("Y",$noww);
$m = date("m",$noww);
$d = date("d",$noww);


session_start(); //开着身份验证，以后写
if (empty($_SESSION['yzm']))
{
exit;
}

if (empty($_GET['id']))
{
exit;
}


$result = mysql_query("SELECT * FROM top WHERE id = '".$_GET['id']."'");
while($row = mysql_fetch_array($result))
  {
$url = $row['url'];
$url = "http://".$url;
$url = str_replace("HTTP://","",$url);
$url = str_replace("http://http://","http://",$url);

////mysql_query("INSERT INTO outsite (ip,time1,kf,len,name,y,m,d) 
////VALUES ('".$iipp."','".$noww."','".$row['kf']."','".$row['len']."','".$row['name']."','".$y."','".$m."','".$d."')");

  }

Header("Location:".$url);////返回来路的地址

include("sql/close.php"); 
?>
