Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.9k views
in Technique[技术] by (71.8m points)

Incomplete results from WHOIS PHP Script

I want to fecth who is infromationn of any domain, but all the tutorials i have seen online only prints out the Registration & expiration date, Registrar Information and nameservers.

I need more information like Registrants email, City, Postal Code , Registrant Phone , Admin Name, email etc. I have seen some sites fetch those Whois data, but my script doesnt include those fields.

Heres what i did

 function GetWhoisInfo($whoisserver, $domain){
   $port = 43;
   $timeout = 10;
   $fp = @fsockopen($whoisserver, $port, $errno, $errstr, $timeout) or die("Socket Error " . $errno .                " - " . $errstr);
   stream_set_blocking($fp, true);
   fputs($fp, $domain . "
");
  $out = "";

   while(!feof($fp)){
       $out .= fgets($fp, 8192);       
   } 
   fclose($fp);  
   return $out;
 }

Then i echo the fucnction

I have tried several scripts, it didnt work, the only one that was close was fetching Whois of an IP address, but it wont be accurate for me since multiple domains on a server cxan share an ip.

Thanks


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...