How do I query a Whois server using a socket?
Author: Deron Eriksson
Description: This Java tutorial describes how to query a Whois server via a Socket.
Tutorial created using: Windows XP || JDK 1.5.0_09 || Eclipse Web Tools Platform 2.0 (Eclipse 3.3.0)


Page: < 1 2

(Continued from page 1)

The console results of executing the WhoisQuery class are shown below. Notice that 'abcnews.com' is queried at whois.enom.com:43 and whois.internic.net:43.

**** Performing whois query for 'abcnews.com' at whois.enom.com:43
Visit AboutUs.org for more information about ABCNEWS.COM
<a href="http://www.aboutus.org/ABCNEWS.COM">AboutUs: ABCNEWS.COM </a>




Registrant:
ABC, Inc.
   77 West 66th Street
   506 Second Ave. Suite 2100
   New York, NY 10023-6298
   US

   Domain Name: ABCNEWS.COM

   ------------------------------------------------------------------------
   Promote your business to millions of viewers for only $1 a month
   Learn how you can get an Enhanced Business Listing here for your domain name.
   Learn more at http://www.NetworkSolutions.com/
   ------------------------------------------------------------------------

   Administrative Contact, Technical Contact:
      dig.com		dns-ops@DIG.COM
      506 2ND AVE STE 2100
      SEATTLE, WA 98104-2300
      US
      (206) 664-4000 fax: (206) 664-4009


   Record expires on 21-Apr-2008.
   Record created on 20-Apr-1995.
   Database last updated on 29-Nov-2007 11:54:01 EST.

   Domain servers in listed order:

   SENS01.DIG.COM               199.181.134.16
   SENS02.DIG.COM               199.181.135.199
   ORNS01.DIG.COM               198.187.189.44
   ORNS02.DIG.COM               198.187.190.44
**** Performing whois query for 'abcnews.com' at whois.internic.net:43

Whois Server Version 1.3

Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.

   Domain Name: ABCNEWS.COM
   Registrar: NETWORK SOLUTIONS, LLC.
   Whois Server: whois.networksolutions.com
   Referral URL: http://www.networksolutions.com
   Name Server: SENS01.DIG.COM
   Name Server: SENS02.DIG.COM
   Name Server: ORNS01.DIG.COM
   Name Server: ORNS02.DIG.COM
   Status: clientTransferProhibited
   Updated Date: 06-apr-2007
   Creation Date: 20-apr-1995
   Expiration Date: 21-apr-2008


>>> Last update of whois database: Sun, 20 Jan 2008 20:56:58 UTC <<<

NOTICE: The expiration date displayed in this record is the date the
registrar's sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant's agreement with the sponsoring
registrar.  Users may consult the sponsoring registrar's Whois database to
view the registrar's reported date of expiration for this registration.

TERMS OF USE: You are not authorized to access or query our Whois
database through the use of electronic processes that are high-volume and
automated except as reasonably necessary to register domain names or
modify existing registrations; the Data in VeriSign Global Registry
Services' ("VeriSign") Whois database is provided by VeriSign for
information purposes only, and to assist persons in obtaining information
about or related to a domain name registration record. VeriSign does not
guarantee its accuracy. By submitting a Whois query, you agree to abide
by the following terms of use: You agree that you may use this Data only
for lawful purposes and that under no circumstances will you use this Data
to: (1) allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via e-mail, telephone,
or facsimile; or (2) enable high volume, automated, electronic processes
that apply to VeriSign (or its computer systems). The compilation,
repackaging, dissemination or other use of this Data is expressly
prohibited without the prior written consent of VeriSign. You agree not to
use electronic processes that are automated and high-volume to access or
query the Whois database except as reasonably necessary to register
domain names or modify existing registrations. VeriSign reserves the right
to restrict your access to the Whois database in its sole discretion to ensure
operational stability.  VeriSign may restrict or terminate your access to the
Whois database for failure to abide by these terms of use. VeriSign
reserves the right to modify these terms at any time.

The Registry database contains ONLY .COM, .NET, .EDU domains and
Registrars.

As a last point, notice that querying the different WhoisW servers returns different information.

Page: < 1 2