PHP Classes

File: vendor/frdl/php-floodprotection/README.md

Recommend this page to a friend!
  Classes of Till Wehowski   PHP RDAP Server   vendor/frdl/php-floodprotection/README.md   Download  
File: vendor/frdl/php-floodprotection/README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP RDAP Server
Process RDAP queries about an IP address or domain
Author: By
Last change:
Date: 11 days ago
Size: 399 bytes
 

Contents

Class file image Download

php-floodprotection

Simple IP Flood Protection

Code from https://stackoverflow.com/questions/3026640/quick-and-easy-flood-protection as Class.

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 *");
 }