PHP Classes
Icontem

Class: IP Address Subnet Sniffer


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Jeffrey Silverman  >  IP Address Subnet Sniffer  >  Download  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: IP Address Subnet Sniffer Support forum
Base name: ipaddresssubnetsniff
Description: Determine if an IP address belongs to a subnetwork
Related top rated classes: , ,
Version: -
Required PHP version: -
License: GNU General Public License (GPL)
All time users: 1177 users
All time rank: 2204
Week users: 1 user
Week rank: 3529
 
  Author   Group folder image Groups   Detailed description  
  Rate classes User ratings   Applications   Files Files  

Author

Picture of Jeffrey Silverman
Name: Jeffrey Silverman <e-mail contact>
Published packages: 2 Browse this author's classes Browse this author's classes
Country: United States United States - PHP jobs in United States
Home page: ???
Age: ???
All time rank: 818
Week rank: 955

Groups

Group folder image Networking Networking protocols, clients and servers View top rated classes

Detailed description

This class can be used to determine wether a given IP address belongs to a given list of subnetworks.

The class takes an array of subnetwork masks to be checked in the form of strings with decimal numbers seperated dots .

Then the class can check whether a given IP address belongs to any of the specified subnetworks by applying the respective masks.

This class was created to emulate the "Deny from x.x.x.x" directive for Apache (nd other servers -- for example, Samba uses a similar format for allowing/denying access to a range of IP addresses). I needed a way to deny/allow access to a range of IP addresses but, for technical reasons, I could not use a .htaccess file, and had to do the IP address processing within the PHP script itself.

For example, you can emulate the line "Deny from 192.168.0.0/24" by supplying the string "192.168.0.0/24" to the class. To see exactly how to do this, see the documentation within the class file itself.

User ratings

There are not enough user ratings to display for this class.

Applications that use this class

No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

Files

File Role Description
Plain text file IPAddressSubnetSniffer.php Class This class determines whether a given IP address is in a given list of subnets. The idea is to use this determination to allow/deny access to a PHP script based on IP address. Because of the way a particular web environment that I was using was set up, I was unable to use a .htaccess file for this task. I could not find a built-in PHP function or functions to do this task, so this class was built.
Plain text file README Data Shorty documentation
Download all files: ipaddresssubnetsniff.tar.gz ipaddresssubnetsniff.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products