News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Gregg's Blog:
PHP algorithms Determining if an IP is within a specific range.
April 28, 2009 @ 09:25:39

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, start-end range, classless inter-domain routing.

He looks at each method and includes descriptions and code examples as well as a link to the source code and a live demo of it in action.

0 comments voice your opinion now!
algorithms ip address specific range three method wildcard cidr startend


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Tim Bray Explains Why Solaris in a Good Choice for PHP Developers

Tim Koschuetzki's Blog: Composing Methods: Remove Assignments to Parameters

Paul Gregg's Blog: PHP algorithms: Determining if an IP is within a specific range.

PHP-Coding-Practices.com: Composing Methods: Introduce Explaining Variable

DevShed: Using Method Call Overloading in PHP 4


Community Events

Don't see your event here?
Let us know!


library opinion voicesoftheelephpant laravel5 version series framework introduction laravel video extension unittest language php7 api development podcast interview release community

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework