use internic
$fp = fsockopen("whois.internic.net", 43, &$errnr, &$errstr);
fputs($fp, "$domainname\n");
$text = '';
while (!feof($fp))
$text .= fgets($fp, 2048);
if ( ereg("No match for", $text ) )
{
$found = 1;
echo "<a href=http://www.networksolutions.com/cgi-bin/whois/whois?$domainname>$domainname</a><br>\n";
flush();
}
fclose($fp);
// where $domainname is the domain your interested in.