I have a site where a user submits a message using AJAX to a file called like.php. In this file the users message is submitted to a database and it then sends a
like.php
You don't need to go through the whole record file. Instead:
FLOODPOOL_DURATION && substr($entry, 0, 3) === 'fp_'){ unlink($filename); } } closedir($handle); }
Usage example:
if(floodpool_check($_SERVER['REMOTE_ADDR'])){ header("HTTP/1.1 429 Too Many Requests"); exit("Hit some *"); }