News Feed
Sections




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

DevShed:
Validating IP Addresses with Filters in PHP 5
August 26, 2009 @ 15:52:05

DevShed has posted the seventh part of their "validator" series today. This time they look at validating IP addresses with the filter_var function.

You can surely appreciate this functionality when developing modules, classes, plug-ins, etc. that must perform some kind of strong validation on incoming data. The filter extension comes armed with another handy filter, though, that permits you to check some common things, such as the IP addresses of client machines.

The give an example of using the FILTER_VALIDATE_IP constant to check the IP address format and include the optional FILTER_FLAG_IPV4 check for the IPv4 format.

0 comments voice your opinion now!
validate filter ip address tutorial


blog comments powered by Disqus

Similar Posts

NETTUTS.com: Adding Caching to a Data Access Layer

Chris Renner's Blog: Gerrymandered Code: Extending Zend_Registry to globalize session vars

Master Zend Framework: Running the ZF2Skeleton with PHP’s Built-in Webserver

HowTo Forge: Installing The PHP-MSSQL Module On CentOS 5.0

SitePoint PHP Blog: Simple Captchas with PHP and GD


Community Events





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


deployment developer laravel introduction release framework series bugfix interview community voicesoftheelephpant symfony library podcast api conference tips list language zendserver

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