WHOIS database

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
parms
Forum Newbie
Posts: 6
Joined: Wed Aug 07, 2002 5:57 am

WHOIS database

Post by parms »

I want to make a php interface that can search the WHOIS database for .com names and .co.uk names.

Is this easy to do and if so how do i go about it beacause i havnt a clue.

Please help :roll:
darkshine
Forum Newbie
Posts: 15
Joined: Wed Aug 07, 2002 4:15 am
Location: paris, france

Post by darkshine »

ok that one works with Network solution
[syntax=php]function NS_whois($domain){
if (trim($domain) <> "") {
$domain = trim($domain);
$fp = fsockopen("whois.networksolutions.com", 43, $errno, $errstr, 30);
if (!$fp) {
return "$errstr ($errno)";
} else {
fputs($fp, "$domain\r\n");
$return = "";
while (!feof($fp)) {
$return .= fread($fp, 128);
}
fclose ($fp);
return $return
}
}

}[/syntax]
darkshine
Forum Newbie
Posts: 15
Joined: Wed Aug 07, 2002 4:15 am
Location: paris, france

Post by darkshine »

use an array for only selecting the omains u want :

'com'=>'whois.internic.com'
'uk'=>'whois.nic.uk'
Post Reply