domain lookup help please
Moderator: General Moderators
domain lookup help please
how would i make it to lookup if a domain is taken or not for my hosting site im working on... if anyone could help, thanks!
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
Re: domain lookup help please
You could do a "host" on it and see if anything comes back. (Assuming you're on a unix-ish system, not Windows)stylezeca wrote:how would i make it to lookup if a domain is taken or not for my hosting site im working on... if anyone could help, thanks!
Code: Select all
$output = pass_thru ("host thebentinel.com");
print ($output);That's not 100%, just because no information comes back from host doesn't mean it's available. But if something DOES come back, that means it's not available. (Unless Verisign pulls that stunt with Sitefinder again. Evil empire, they.)
My hosting provider, lomag.net, does it when I try to register a domain. You could contact them and ask them how they do it. support@lomag.net
-
TheBentinel.com
- Forum Contributor
- Posts: 282
- Joined: Wed Mar 10, 2004 1:52 pm
- Location: Columbus, Ohio
Re: domain lookup help please
No, wait. There's apparently some builtin functions in PHP that do this and do it right. (Or so the docs claim)TheBentinel.com wrote:You could do a "host" on it and see if anything comes back.
Check out http://us4.php.net/checkdnsrr
Hope it helps!