> Hi, I would use a regular expression to check it.  This is a pretty
general
> one, but I think it should do the trick.  It searches for 1 or more upper
> or lowercase letters, followed by a literal dot, followed by 2 or 3
> lowercase letters.  Of course there are valid domains that would not match
> this (foobar.co.uk) for example, but it should work with the values you
> specified.

1. Doesn't check every TLD as you acknowledge.

2. Doesnt't check validity as in the domain exists!

If I wanted to check the domain was valid and existed I would do a Whois and
NSLookup.

Regards

Jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969
PGP Key available, send email with subject: Send PGP Key






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to