PHP Classes
elePHPant
Icontem

PHP Block IP Range: Check if IP is in a blacklist or a whitelist

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2013-07-16 (1 year ago) RSS 2.0 feedNot yet rated by the usersTotal: 650 This week: 3All time: 4,553 This week: 540Up
Version License PHP version Categories  
block-ip-range 1.0GNU Lesser Genera...5.0Networking, PHP 5, Security
Description Author  

This class can check if IP is in a blacklist or a whitelist.

It takes a given IP address and checks if it is not supposed to be block by checking if it is either in a whitelist or it is not in a blacklist.

Both lists are read from distinct text files with the same format to describe the IP addresses to match.

They can specify individual IP addresses or ranges using wildcard patterns or the addresses that start and end of the ranges.

The class can also provide a text message or an integer status value that explain why the given IP address passed or not the checks.

Picture of Robert Mahan
Name: Robert Mahan <contact>
Classes: 1 package by
Country: United States United States
Age: 68
All time rank: 2653335 in United States United States
Week rank: 525 Up56 in United States United States Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Usage Example file
Accessible without login Plain text file Example2.php Example Example testing IPs
Plain text file ipblocklist.class.php Class Class file
Accessible without login Plain text file readme.txt Doc. Documentation
Accessible without login Plain text file _blacklist.dat Data Example file
Accessible without login Plain text file _whitelist.dat Data Example file

 Version Control Unique User Downloads Download Rankings  
 0%Total:650All time:4,553
 This week:3This week:540Up