News Feed
Jobs Feed
Sections




News Archive
DevShed:
Validating URL Protocols, Hosts and Paths with Filters in PHP 5
August 20, 2009 @ 10:45:59

DevShed continues their validation series today with this new tutorial, a look at validating URLs, host and paths with the filter extension bundled with PHP.

Validation process performed on URLs [in the previous part of the series] was pretty simplistic. Thus, in this sixth episode of the series I'm going to dig deeper into the usage of the FILTER_VALIDATE_URL filter to show you how to validate different portions of a URL, including its protocol, host and eventual paths.

They enforce the filtering by adding in the FILTER_FLAG_SCHEME_REQUIRED or FILTER_FLAG_HOST_REQUIRED flags to the filters to ensure the information is valid too (not just in the right format).

0 comments voice your opinion now!
tutorial filter url host path validate


blog comments powered by Disqus

Similar Posts

Sanisoft Blog: Inspekt - put a firewall in your PHP applications

9Lessons.info: Login with Instagram OAuth using PHP

DevShed: PHP Object Oriented Programming using LSP

ProDevTips: Sorting 2D-arrays in PHP - anectodes and reflections

DeveloperDrive.com: What Web Developers Need to Know About Cross-Site Scripting


Community Events











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


language community release framework introduction symfony2 podcast series rest zendframework2 usergroup database interview development unittest phpunit testing conference opinion functional

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