URL Validation
| From: | Jan S. | Date: | Sat, 26 Oct 2002 16:24:37 +0000 |
| Subject: | URL Validation | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16569@lists.php.net to get a copy of this message | ||
hello, i have written a litle script how validate a url (ns) but it isn't perfect ... plz help
me
if(preg_match("/^ns([1-9]*)\.([a-z0-9-]+)\.([a-z]{2,})\.$/",$url)) echo 'url
ok';
// for bind (zones) @ linux
example: $url='ns1.testing.com.'; // work fine
but $url='ns1.-testing.com.'; // is also working ... but it isn't a valid url ...
Jan S.
Germany