Page 1 of 1

Whois Information Query Issue

Posted: Thu Feb 12, 2004 9:32 am
by kendall
Hello,

the following is code that i developed a while now that searches whois databases for domain records of a domain if unavailable

Code: Select all

// declare look up servers variables
$TLDservers = array("com"=>"whois.networksolutions.com","net"=>"whois.nsiregistry.net","org"=>"whois.networksolutions.com","info"=>"whois.afilias.info","biz"=>"whois.neulevel.biz");

//whois query
function LOOK_UP($server = false,$domain,$record = false){
	// if look up record only
	if($record == true){
		//look up domain records
		$record = checkdnsrr($domain);
		return $record;
	}else{
		// look up domain registrants	
		$port = '43';
		$fp = fsockopen($server,$port,&$errno,&$errstr,30);
		if(!$fp){
			return false;
		}else{
			fputs($fp, "$domain\r\n");
				while(!feof($fp)) {
               	 $data .= fgets($fp,128);	
            	}
       		 fclose($fp);
		}
		//echo $data;
		if($data != false)
			return strstr($data,'Domain Name');
		else
			return false;
	}
}
Now it used to work fine but lately i note that my searches for domains that are already taken are showing up as available.

now note the
if($data != false){return strstr($data,'Domain Name'); }
When the records of a domain name came back i searched from where the Domain Information starts and return this....Now I am receiving the information but there seems to be no instance of 'Domain Name' hence why my searches are coming up incorrectly.

in one instance i note i get a
server busy try again...
not sure what it means by that (except the obvious) but can anyone offer a better solution for me here....

is there a mother of all whois databases that i can you that can make my searches more accurate?

Kendall

Posted: Tue Jun 07, 2005 4:06 am
by anjanesh
Was looking for whois info.

It seems whois.networksolutions.com does not return all .com entries - only those that were registered under networksolutions.
Take for example http://dnsstuff.com/tools/whois.ch?ip=xxx.com
It says "I was referred to whois.opensrs.net; I'm looking it up there."

How do I get the info - need to refer to this registrar ?
How do we know where to refer to ?

And checkdnsrr() is giving Fatal error: Call to undefined function checkdnsrr() in Windows but works in Linux.