Internet Direct (Indy)
Home
PreviousUpNext
TIdWhois.WhoIs Method

Performs a query for a domain name.

Pascal
function WhoIs(
    const ADomain: string
): string;
Parameters 
Description 
ADomain 
Domain query to send to the server. 

String - Results from the WhoIs server.

WhoIs is a String function used to query the WhoIs server indicated in Host and Port using the query value specified in the ADomain argument. Assign values to the Host and Port properties for the appropriate server before calling this method. 

ADomain is the WHOIS/NICNAME command line and is normally a single name specification. Name specification formats have evolved over time, and the formats implemented on the WHOIS server may be retrieved using a value in ADomain that contains '?'. 

The response from the WHOIS/NICNAME server will list all possible formats that can be used. The responses are not currently intended to be machine-readable; the information is meant to be passed back directly to a human user. 

The following examples illustrate the use of WhoIs. 

Command line:

Response: 

 

Please enter a name or a NIC handle, such as "Smith" or "SRI-NIC".
Starting with a period forces a name-only search; starting with
exclamation point forces handle-only.  Examples:

   Smith        [looks for name or handle SMITH]
   !SRI-NIC     [looks for handle SRI-NIC only]
   .Smith, John [looks for name JOHN SMITH only]

Adding "..." to the argument will match anything from that point,
e.g. "ZU..." will match ZUL, ZUM, etc.

To search for mailboxes, use one of these forms:

   Smith@       [looks for mailboxes with username SMITH]
   @Host        [looks for mailboxes on HOST]
   Smith@Host   [looks for mailboxes with username SMITH on HOST]

To obtain the entire membership list of a group or organization,
or a list of all authorized users of a host, precede the name of
the host or organization by an asterisk, i.e. *SRI-NIC. [CAUTION:
If there are a lot of members, this will take a long time!]  You
may use exclamation point and asterisk, or a period and asterisk
together.

 

Command line: fischer 

Response: 

 

   Fischer, Charles (CF17)     fischer@UWISC        (608) 262-1204
   Fischer, Herman (HF)        HFischer@USC-ECLB    (818) 902-5139
   Fischer, Jeffery H. (JHF1)  FISCHER@LL-XN        (617) 863-5500
                                                    ext 4403 or 4689
   Fischer, Kenneth (KF8)      SAC.SIUBO@USC-ISIE   (402) 294-5161
                                                    (AV)  271-5161
   Fischer, Marty (MF28)       MFISCHER@DCA-EMS     (703) 437-2344
   Fischer, Michael J. (MJF)   FISCHER@YALE         (203) 436-0744
   Fischer, Nancy C. (NANCY)   FISCHER@SRI-NIC      (415) 859-2539
   Fischer, Richard A. (RAF4)  Fisher Richa@LLL-MFE (415) 422-5032

To single out any individual entry, repeat the command using the
argument "!HANDLE" instead of "NAME", where the handle is in
parentheses following the name.

 

Command line: !nancy 

Response: 

 

   Fischer, Nancy C. (NANCY)    FISCHER@SRI-NIC SRI International
   Telecommunication Sciences Center
   333 Ravenswood Avenue, EJ289
   Menlo Park, California 94025
   Phone: (415) 859-2539
   MILNET TAC user

WhoIs calls Connect to open the connection to the WhoIs server identified in Host and Port, and writes the query in ADomain to the WhoIs server using the IOHandler for the connection. 

WhoIs reads results using the AllData method in the IOHandler prior to calling Disconnect.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.