PHP Classes

Flood Blocker: Detect and protect from attempts to flood a site

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (3)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 4,086 All time: 756 This week: 673Up
Version License Categories
floodbl 1.0.0GNU General Publi...HTTP, Security


This class can be used to detect and protect a Web site from attempts to flood it with too many requests. It also allows to protect the site from automatic downloading many pages or files from the same IP address.

The detection of flood is determine according to a set of parameters indicating the maximal allowed number of requests for the certain time interval. It is possible to set several parameters at once in order to perform more effective protection.

Innovation Award
PHP Programming Innovation award nominee
April 2005
Number 2

Prize: One book of choice by O'Reilly
The excess of simultaneous accesses to a site that may be happening in a given moment is one of the causes that can make a site run slower or even stop running.

Sometimes the excess of simultaneous accesses may be caused by a single user that is using automated robots to quickly retrieve all the site pages, or even by badly intentioned users that deliberately want to cause harm to the site by flooding it with an excessive number of simultaneous requests.

This class can help minimizing the harm that flood attempts may cause by keeping track of the IP addresses of the users accessing each page. Then it can determine when the users of a certain IP addresses are executing an excessive number of accesses so a block may be established for a given period.

Manuel Lemos
Picture of Vagharshak Tozalakyan
Name: Vagharshak Tozalakyan <contact>
Classes: 22 packages by
Country: United States United States
Age: 44
All time rank: 61 in United States United States
Week rank: 71 Down8 in United States United States Down
Innovation award
Innovation award
Nominee: 7x

  Files folder image Files  
File Role Description
Plain text file class.floodblocker.php Class Class definition
Accessible without login Plain text file example.php Example Example

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:756
This week:673Up
User Ratings User Comments (3)
 All time
Very uselful class.
12 years ago (Andrew)
I tried the script on my web site and it works great! The HTT...
15 years ago (likos)
i using it.
15 years ago (Real Cyrus)