PHP code example of frdl / php-floodprotection
1. Go to this page and download the library: Download frdl/php-floodprotection library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
frdl / php-floodprotection example snippets
use frdl\security\floodprotection\FloodProtection;
$FloodProtection = new FloodProtection('login', 10, 30);
if($FloodProtection->check($_SERVER['REMOTE_ADDR'])){
header("HTTP/1.1 429 Too Many Requests");
exit("Hit some *");
}