Paul Gregg's Blog: PHP algorithms: Determining if an IP is withi...

Courtesy PHPDeveloper.org  Tue, 04/28/2009 - 08:25

Paul Gregg has shared a method he's come up with to determine if a given IP is within a selected range.

Unfortunately although people usually understand that an IP address is simply an unsigned 32 bit integer, and is easily determined, usually with $_SERVER['REMOTE_ADDR'], where the real challenge is - is in specifying the range within which they wish to check that IP address.

IP ranges are usually specified in three common ways (in increasing complexity): wildcard,...


 

More related items

Doom 3 source code now available
Geek.com: "Let's be clear here. This isn't the code for the game, it's the code for the engine named id Tech 4 that made the game possible."

Google Releases Source Code for Ice Cream Sandwich...
TechLaze: "Android fans all around will be pleasantly surprised to see ICS being open sourced earlier than they anticipated."

Come and git it: Android 4 source now open for all |...
Source code for Android 4 (Ice Cream Sandwich) is now available for developers to examine and manufacturers to build into their new devices.


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com