What is wrong with this code ? If a person clicks on a link before the 10 seconds are finished counting down to 0, they are redirected to a error page. Problems is, it seems to work just once, if i go back and click link again i dont get error page and i should, I dont think it is checking the database right.
// Start - To Check requests from same machine continously
if (!$ipsfseconds) $ipsfseconds=10;
$sql_cur_period2 = "and idate>=".(time()-$ipsfseconds);
if(!e(q("select id from previews where ifrom='$REMOTE_ADDR' $sql_cur_period2")))
{
$errorcode="startpage_skiptoofast";
go();
exit;
}