fullyloaded Posted January 4, 2007 Share Posted January 4, 2007 hii have a script on my site that will let people email other members is there anyway i can have a timer on it so after some one sends a message they will have to wait 1 minute to send another message? Link to comment https://forums.phpfreaks.com/topic/32806-spam/ Share on other sites More sharing options...
chronister Posted January 4, 2007 Share Posted January 4, 2007 The best way I can see doing this is to use a mysql database, and when someone submits, record thier IP address as well as a timestamp and then in your form script, get the ip, and do a query to see if that IP is already in the database, if so, get the timestamp, then compare recorded timestamp with the current timestamp [code]$now=time();[/code] and if the difference is > 60 (seconds) allow them to post again. if not then echo disabled in your button's tag to disable it. Link to comment https://forums.phpfreaks.com/topic/32806-spam/#findComment-152784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.