Re: What would the best way to veladate a URL string?

From: Date: Sun, 14 Dec 2003 01:17:08 +0000
Subject: Re: What would the best way to veladate a URL string?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-172657@lists.php.net to get a copy of this message
On Sun, Dec 14, 2003 at 11:23:25AM +1300, Philip J. Newman wrote: > > What would the best way to veladate a URL string? Validate? How about something like: eregi('^(f|ht)tp://([a-z0-9._:-]+@)?([a-z0-9][a-z0-9-]+\.)+[a-z][a-z]+(/([a-z0-9.%&=-]+)?)?',$string); You can adjust the "get" part to suit... -- Paul Chvostek <paul@it.ca> it.canada http://www.it.ca/ Free PHP web hosting! http://www.it.ca/web/

« previous php.general (#172657) next »