View Single Post
Old 05-29-2012, 05:30 PM  
mkx
Confirmed User
 
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
PHP? Count number of times id shows up in 24 hours (based on timestamp)

I want to limit the amount of times someone uses whatstheirip.com to 25 times per 24 hours instead of 25 times total (which I put in temporarily because it was easier for me to program)

My timestamp looks like this 2012-04-29 02:13:33

I used to have a script like this but I don't think it ever worked =

PHP Code:
$result mysql_query("select count(*) from table where 'time' < now() - 3600");
$row mysql_fetch_row($result);
$count $row[0];

if (
$count 25) { //checks total emails sent within 24 hours
 
die(''); 
mkx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote