PHP Classes

Firewall: Accept or deny requests depending on IP address

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2010-05-11 (5 years ago) RSS 2.0 feedNot enough user ratingsTotal: 1,371 All time: 2,701 This week: 1,004Up
Version License PHP version Categories  
firewall 1.0GNU General Publi...5.0Networking, HTTP, PHP 5, Security
Description Author  

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: 39
All time rank: 118844 in Italy Italy
Week rank: 1623 Down65 in Italy Italy Down
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  
 0%Total:1,371All time:2,701
 This week:0This week:1,004Up