PHP Classes

Firewall: Accept or deny requests depending on IP address

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 70%Total: 1,499 All time: 2,610 This week: 71Up
Version License PHP version Categories
firewall 1.0GNU General Publi...5.0Networking, HTTP, PHP 5, Security


This class can be used to accept or deny requests depending on the user machine IP address.

It can look at the current user IP address and decide to accept or deny the request depending on rules defined in a separate rules file. It can also detect IP addresses behind proxies.

The rules define whether to accept or deny requests from individual IP addresses or whole ranges.

When the current user IP address is denied, it can either redirect the user to another page using Javascript, show a given message, or issue a denied access response header.

Innovation Award
PHP Programming Innovation award nominee
April 2010
Number 3

Prize: One downloadable copy of PhpED Professional
Some times it is necessary to block the access to users from certain IP addresses for some reason.

This class implements a solution to automate blocking accesses to site users from certain addresses using a simple archive to define the IP and ranges to block.

Manuel Lemos
Picture of Temperini Mirko
  Performance   Level  
Name: Temperini Mirko is available for providing paid consulting. Contact Temperini Mirko .
Classes: 3 packages by
Country: Italy Italy
Age: 47
All time rank: 120046 in Italy Italy
Week rank: 346 Up16 in Italy Italy Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example example file
Plain text file firewall.class.php Class firewall source code
Accessible without login Plain text file forbidden.tpl Data aa funny blue death screen
Accessible without login Plain text file rules.table Data the rules table

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:2,610
This week:71Up
 User Ratings  
 All time