include_once "./common.inc.php"; include_once "$root/lib/Common.php"; $referer = parse_url($_SERVER['HTTP_REFERER']); $Pagesech = $_SERVER['HTTP_REFERER']; $UserIp = get_userip(); $today = date("Y-m-d"); $sql1 = "SELECT count(*) as cnt FROM ib_bizitcounter WHERE left(RegDate, 10) = '$today' and UserIp = '$UserIp'"; $result1 = mysql_query($sql1); if ($arrData1 = mysql_fetch_array($result1)) { if ($arrData1[cnt] < 1) { $upcount = "insert into ib_bizitcounter (Serch,Thred,RegDate,UserIp) values ('$Pagesech','$referer[host]',now(),'$UserIp')"; $result = mysql_query($upcount); } } //echo $UserIp; ?>