PDA

View Full Version : What is the best script to query a domain name and get all the info about it?


ConfusedOfLife
12-26-2002, 09:20 AM
Hi
I'm looking for the best way to query a domain and find all the information available about it. I have this script that I got from the php mans and can query the Network solutions whois database, but it doesn't give much information, like the name of the registrar and also his/her country.

Here's the script:

<?
$domain = "arifbudiman.net";
if (trim($domain) <> "") {
$domain = trim($domain);
$fp = fsockopen("whois.networksolutions.com", 43, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)";
} else {
fputs($fp, "$domain\r\n");
print "<pre>\r\n";
while (!feof($fp)) {
echo fread($fp,128);
}
print "</pre>";
fclose ($fp);
}
}
?>
// Courtesy of Arif.Budiman@no.spam.please


But if you go to register.com, you see a real better explanation of the domains and also some suggestions for similar domains that are not taken if your desired name is taken.
I'm simply looking for the best way to do this and any help/suggestion on this would be appericiated.

ConfusedOfLife
12-27-2002, 06:15 PM
Dear bijan it's what I suggest: http://www.devshed.com/Server_Side/PHP/whois/page1.html

I hope other members can help you too!

Also Merry Xmas to you all!