PHP Classes

PHP Flood Protection: Prevent abusive accesses from the same IP address

Recommend this page to a friend!
  Info   View files Documentation   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 172 This week: 1All time: 8,806 This week: 560Up
Version License PHP version Categories
php-floodprotection 1.0.0MIT/X Consortium ...5.3Networking, PHP 5, Security
Description 

Author

This class can be used to prevent abusive accesses from the same IP address.

It can keep track of the accesses to a certain resource controlled by the current PHP Web script to limit the number of access attempts to a given reasonable number.

The class records in a file of the last accesses for a given period of time to assure that the number of accesses does not exceed the specified limit.

Picture of Till Wehowski
  Performance   Level  
Name: Till Wehowski <contact>
Classes: 30 packages by
Country: Germany Germany
Age: 45
All time rank: 107469 in Germany Germany
Week rank: 411 Up15 in Germany Germany Up
Innovation award
Innovation award
Nominee: 12x

Documentation

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

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imagephp-floodprotection (1 directory)

  Files folder image Files  /  src  /  php-floodprotection  
File Role Description
Files folder imagefrdl (1 directory)

  Files folder image Files  /  src  /  php-floodprotection  /  frdl  
File Role Description
Files folder imagesecurity (1 directory)

  Files folder image Files  /  src  /  php-floodprotection  /  frdl  /  security  
File Role Description
Files folder imagefloodprotection (1 file)

  Files folder image Files  /  src  /  php-floodprotection  /  frdl  /  security  /  floodprotection  
File Role Description
  Plain text file FloodProtection.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:172
This week:1
All time:8,806
This week:560Up