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: 159 All time: 8,856 This week: 196Up
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: 27 packages by
Country: Germany Germany
Innovation award
Innovation award
Nominee: 9x

Details

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:159
This week:0
All time:8,856
This week:196Up
For more information send a message to info at phpclasses dot org.