Vancouver Web Consultants

January 10, 2010

Fixing Safari Upload Hangs with Mootools

Filed under: Mootools, PHP, Tutorials, Web Browsers — Tags: , — Nelson @ 6:32 pm

Safari has a tendency to hang when uploading files, and it turns out there’s an easy fix. (more…)

July 10, 2009

Validating a URI with PHP

Filed under: PHP — Tags: , — Nelson @ 4:34 pm

If you find yourself needing to validate a URI, not just checking that it’s well formed with a regular expression like this:

/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i

…but actually verifying that the URI points to a functioning web page, the following code will do the trick. (more…)

Powered by WordPress