Im making forum software. Now i want to add anti-flood. So when a post gets posted, a date("j-n-Y H:i:s") gets put in the table. Now i want a max of 4 posts per minute, or 15 seconds between each post. What is the best way to check that?
Im making forum software. Now i want to add anti-flood. So when a post
Share
You can get the time 15 seconds ago with
Then find the number of posts made by this user after that time. If the count is more than 0, discard the post.
If you’d rather have the 4 posts/minute rule, do the same thing but with 60 seconds and discard if the count is more than 4.