DATE_ADD(NOW(),INTERVAL -1 HOUR)"); $row = mysql_fetch_assoc($querysql); if($row['tot'] == "0") { $query="INSERT INTO statistiche(idBanner,url,referrer,dataeora,indirizzoip,useragent) VALUES ($idBanner,'$link','$referrer',NOW(),'$indirizzoip', '$useragent')"; $result = mysql_query($query,$db); if(!$result) { mail("info@lenottidiroma.it","Errore durante la registrazione di una statistica","banner:" . $idBanner . " link: " . $link . " referrer: " . $referer . " query: " . $query,"From: info@lenottidiroma.it"); } else { header("Location: " . $link); } } else { header("Location: " . $link); } } else { mail("info@lenottidiroma.it","Sospetto bot"," url: " . $link . " referrer: " . $_SERVER['HTTP_REFERER'] . " useragent: " . $_SERVER['HTTP_USER_AGENT']); } } ?>