Re: [PHP] Check if var is a domain name

2002-02-06 Thread Jon Farmer
> note that www.mynewdomain.com CAN be a valid domain also. Err... sub-domain. -- 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://

Re: [PHP] Check if var is a domain name

2002-02-06 Thread bvr
Oh, according to the manual this doesn't work on Windowz. bvr. On Wed, 06 Feb 2002 11:26:42 +0100, bvr wrote: > >You can online check for a valid domain using > >if (checkdnsrr($mydomain, "SOA")) >{ > echo("is valid domain"); >} > >note that www.mynewdomain.com CAN be a valid domain al

Re: [PHP] Check if var is a domain name

2002-02-06 Thread bvr
You can online check for a valid domain using if (checkdnsrr($mydomain, "SOA")) { echo("is valid domain"); } note that www.mynewdomain.com CAN be a valid domain also. bvr. On Tue, 5 Feb 2002 07:59:22 -0800, Brandon Orther wrote: >Hello, > >Does anyone know a function or how I could

Re: [PHP] Check if var is a domain name

2002-02-06 Thread Jon Farmer
> 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 mat

Re: [PHP] Check if var is a domain name

2002-02-05 Thread Mike Frazer
Your reg-ex wouldn't quite work. Remember, .info, .name, .coop and other new TLDs are out or are coming out soon. A limit of {2,3} would rule them all out as invalid. It's only really possible if you have a list of all available TLDs and compare in part to that. There are like 130 TLDs too, so

Re: [PHP] Check if var is a domain name

2002-02-05 Thread Jeff Sheltren
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 t