Click to See Complete Forum and Search --> : D.N. checking script ??


DaveinLondon
06-19-2006, 10:21 AM
Hi
virtually all hosting sites have that ittle box where you can check if the domain name that you want is available or not.

Do you have to be a registrar to use that checking facility or is it a simple php script ?

I would like to put it on my site !

Thanks for any advice.

NogDog
06-19-2006, 03:56 PM
I can't tell you how they're doing it, but a quick and dirty method you could use in PHP is the gethostbyname() function: if it returns an IP address then you can assume the name is registered, and if not it probably is not registered (though the latter would not be conclusive).

Sheldon
06-19-2006, 04:24 PM
With PHP 5 you can use dns_get_record() but does not work with PHP 4

NogDog
06-19-2006, 04:43 PM
With PHP 5 you can use dns_get_record() but does not work with PHP 4
Also, it doesn't work on Windows, regardless of version.