NYCPHP Meetup

NYPHP.org

[nycphp-talk] regexp for URLs (is this correct?)

David Mintz dmintz at davidmintz.org
Mon May 3 16:18:42 EDT 2004


I know this is sort of a copout but once, when I had this situation and
had the resources to kill -- importing thousand rows from a text file to
MySQL and sanity-checking a ton of things in the process -- I said the
hell with it, let's just try to access the resource that the URL points
to. No response means URL no good, well-formedness notwithstanding.

 if ($handle = @fopen ($url, "r"))

True, a site could be down temporarily. Call it the
one-strike-and-you're-out rule.



---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list