PHP Classes

Firewall: Accept or deny requests depending on IP address

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 70%Total: 1,500 All time: 2,609 This week: 47Up
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: 47
All time rank: 120146 in Italy Italy
Week rank: 199 Up7 in Italy Italy Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files (4)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,500
This week:0
All time:2,609
This week:47Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:100%StarStarStarStarStarStar
Documentation:-
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:70%StarStarStarStar
Rank:280