views:

1281

answers:

4

Not only easy ones like .com or .net, but also, .co.uk, .fr, .gov.rw ... ?

Should I really make a huge mapping "tld to relevant whois server", or is there an easier way ?

+3  A: 

http://whois.net/ any good?

DanSingerman
It's far from complete :( Doesn't even have UK tlds...
BraveSirFoobar
A: 

You may have to try different services:

This one seems to work for a lot more than the standard Whois: http://whois.domaintools.com/

Works for .co.uk and .fr as well as the standard ones

Damien
+2  A: 

php

$URL = "http://www.dotnetindex.com/articles/5261-Article--AJAX-Tips-and-Tricks.asp";

$PARSED_URL = parse_url($URL);

$DOMAIN = $PARSED_URL['host'];

$ip = gethostbyname($DOMAIN);

if($ip===$DOMAIN)

{ echo "Url does not exist"; }

else { echo "Url exists"; }

Ashutosh Singh
Not a good check, for example example.org may not point to an IP but www.example.org may point to a valid IP (example.org may only have NS and MX records).
Kurt
+2  A: 

Do you want to know if the domain is registered, or if it's actually present in the DNS ?

If the former, then whois based approaches are the only viable way, and even then you'll run into massive issues parsing the highly varied output from the various TLDs whois servers.

If the latter, a simple DNS lookup will suffice.

Alnitak