ASP WhoIs Version 2
Documentation
Welcome
Thank you for purchasing ASP WhoIs Version 2. We have improved the component to make it easier to use with new advanced features.
New features include:
Automatic WhoIs server lookup. For example, if you want to lookup a government domain, just type it in and ASP WhoIs will automatically select the correct server and return the results.
Automatic WhoIs server selection for COM, ORG, NET and EDU domains. With the changes in the network registry it has become difficult for web site programmers to keep up with all of the Registrars and their associated servers. ASP WhoIs will lookup the domain and find the correct WhoIs server. It will the query the second server to get the correct results. (able to be overridden)
Automatic removal of the disclaimer message sent with the results from Internic (optional and configurable).
Debug information can be turned on to see what the component is doing.
The timeout can be set to prevent long wait times.
Installation
Run the ASPWhoIs2.exe program that you downloaded (or received in E-Mail). This will install the component and register it with the system.
If you didn't install the sample files in your web server directory, do so now. They can be found in the installation directory \examples directory. You can just copy/upload those to a directory on your server called "ASPWhoIs" under your web server directory.
Browse to http://yourwebserver/ASPWhoIs/Default.Asp to see the component in action.
Usage
Simple Example:
set
objWhoIs = Server.CreateObject("WhoIs2.WhoIs")
strResponse = objWhoIs.WhoIsHTML("abcnews.com")
Response.Write(strResponse)
Common Problems:
ActiveX Object can't be created: Usually this means that the install program didn't do it's job properly. To fix this, browse to the installation directory (defaults to c:\program files\ASPWhoIs2) and type: regsvr32 WhoIs2.dll
Methods:
| Method | Returns | Description |
| WhoIs | String | Retrieves the WhoIs information for the passed host and
returns it formatted exactly as it was passed from the server. Paramaters: HostName Example: Set objWhoIs = Server.CreateObject("WhoIs2.WhoIs") WhoIsInfo = objWhoIs.WhoIs("microsoft.com") Response.Write(WhoIsInfo) |
| WhoIsHTML | String | Retrieves the WhoIs information for the passed host
formatted for display on an HTML page (Carriage Returns and Line Feeds are
replaced with <br>) Paramaters: HostName Example: Set objWhoIs = Server.CreateObject("WhoIs2.WhoIs") WhoIsInfo = objWhoIs.WhoIsHTML("microsoft.com") Response.Write(WhoIsInfo) |
| DomainNameAvailable | Boolean | Used to check if a domain name is available. Paramaters: HostName Example: Set objWhoIs = Server.CreateObject("WhoIs2.WhoIs") If objWhoIs.DomainNameAvailable("microsoft.com") Then Response.Write("The domain name is available!") Else Response.Write("The domain name is not available") End If |
Properties:
| Property | Type | Description |
| Timeout
|
Integer | Number of seconds ASP WhoIs will wait for
a connection or response from the server. Default: 20 |
| PruneDisclaimer | Boolean | Some servers include a disclaimer
somewhere in the information they return that you may not want to have
displayed to the user. If you would like to omit this information, set
this option to TRUE. Default: TRUE |
| DisclaimerStart | String | If you selected PruneDisclaimer above, you
need to tell ASP WhoIs where the disclaimer starts. Default: The Data in Network Solutions |
| DisclaimerEnd | String | If you selected PruneDisclaimer above, you
need to tell ASP WhoIs where the disclaimer ends. Default: abide by this policy. |
| AlternateWhoIsString | String | The records at whois.internic.net include
a WhoIs Server entry. The information returned is useless, except to find
the proper WhoIs Server for a lookup. ASP WhoIs will automatically
redirect its query to the proper server. This is the string it looks for
to find the proper server. Default: Whois Server: <space><space>Whois Server:<space> |
| Debug | Boolean | If you would like debug messages printed
to your screen, set this option to TRUE. Default: TRUE |
| LastErrorMsg | String | Holds the last error message. Deafult: (blank) |
| LastErrorNum | Integer | Holds the last error number. Errors: 0 = Success 1 = Connection Failure Default: 0 |
| PruneCopyright | Boolean | Some servers include a copyright
on the top of their output. Set this to True if you would like it removed. Default: TRUE |
| CopyrightString | String | The terminating string of the copyright messages. The ASP
WhoIs component looks for this string to mark the end of the copyright
string. It is not case sensitive. Default: All rights reserved. |
| WhoIsServer | String | ASP WhoIs includes a list of domain
suffixes and their associated WhoIs servers. If you need to modify this
list, it is in the same directory as the DLL with the name WhoIs2.Ini. Use
a text editor to change the file.
If you would like to specify the name of
the WhoIs server, use this option. This overrides any information found in
the WhoIs2.Ini file. |
| AvailableString | String | When this string is encountered in the response from a
WhoIs host, it is assumed that the domain name is available. This string
is used in the DomainNameAvailable method. It is case sensitive. Default: No match |
| WhoIsServerPort | Integer | The port used to connect to the WhoIs server. Default: 43 |