Jump to content
xisto Community
Sign in to follow this  
kakingho

About Whois System searching websites information

Recommended Posts

I want to install whois system in my website in which my visitors can search other websites' information.I want to have php source code of it.Is it free of charge? :( What is the official website of WHOIS??!thx~ :(

Share this post


Link to post
Share on other sites

I believe this is what you're looking for

http://www.web-development-blog.com/php-whois-script/

Found initially on Codebeach.com

If you havent been to codebeach.com .. check it out.

( I dont know PHP so I didnt check to see if it's exactly what you needed or not.. I didnt see a demo of it on the Codebeach site either.. but I'm sure it's worth a look at least)

=)

Share this post


Link to post
Share on other sites

Whois information can be accessed from whoever the official authority over that particular TLD is. For example, VeriSign Global Registry Servers controls the .COM and .NET top-level domains, so you would access their whois servers to retrieve a whois record for any .COM domain name (such as Xisto.com).

Note that whois servers operate on port 43, so you would need to connect, in this example, to whois.verisign-grs.com:43 to retrieve a whois record. After connection, all you need to send to the server is the domain name followed by CR+LF (\r\n or chr(13).chr(10)), and the whois server will return the record if the domain exists (or will inform you if it doesn't).

You will need to know a little about socket coding to access a whois records, regarldess of which programming language you wish to do it in.

Here is an example of retrieving a whois record. I quickly constructed this while writing this post, and haven't tested it - theoretically, at least, it should work.

<?phpfunction whois_record( $domain_name, $whois_server = 'whois.verisign-grs.com' ) {  if( !($socket = @fsockopen($whois_server,43) ) {    die('Could not connect to whois server.');  }  // Note that the '=' symbol means the domain name is explicit, and instructs the whois server to return a result for that domain name only, not for other possible matches (e.g. try 'google.com' without the equals symbol).  fputs($socket, "=$domain_name\r\n");  $whois_record = '';  while( !feof($socket) ) {    $whois_record .= fgets($socket,1024);  }  fclose($socket);  return $whois_record;}?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.