SamLogic Internet Components - Home
ActiveX: WhoIs      (Filename: SLWHOIS.OCX)


WhoIs is an ActiveX component that allows you to query a WHOIS server for domain registration information. With this control you can obtain company name, address and contact information for a specific domain on the Internet. The information is returned as a text string.
 
 
Properties
 
Name Type Description
WhoIsServer String Specifies a WHOIS server on the Internet, for example "whois.networksolutions.com".
 
 
Methods
 

GetInfo (Address As String) As String

Returns WHOIS information about a domain name. The parameter Address specifies the specific domain to request information about. The method returns WHOIS data as a string. If an error occurs, the method returns an empty string and an error code can be obtained by calling the GetLastError method.

Some WHOIS servers require that the "www." at the beginning is excluded, so for example if you want to make a WHOIS request about Microsoft, you must enter "microsoft.com".

GetLastError () As Long

Returns an error code for the last error that occurred in the control. A list of possible error codes is available here.
  

 
 
Example

Dim sWhoIsData As String
 
WhoIs1.WhoIsServer = "whois.networksolutions.com"  ' Specify a WHOIS server
sWhoIsData = WhoIs1.GetInfo("microsoft.com")      
' Get WHOIS data for www.microsoft.com
 
 
< Go back
 
 
SamLogic