WhoisDLL manual.

Overview
WhoisDLL is a Whois COM object that makes querying domain names a lot easier. The whois server is automagically found (whois servers aren't hard coded in) by WhoisDLL, and the lookup is then done using this. The server it uses is then available as a property, the whois lookup is performed using one simple method.
Methods/Properties
Methods:
whoisdll.whois(domain)
Returns the lookup information for the domain, specified by 'domain'. If there was an error during lookup, this method returns a blank string, and the error is available in the Error property.
whoisdll.nl2br(str)
Takes a string, specified by 'str' and converts all newlines (Ascii character 10) to "<BR>".
whoisdll.nl2CrLf(str)
Takes a string, specified by 'str' and converts all newlines (Ascii character 10) to Ascii character 10 and 13, a carriage return in Windows.
Properties:
whoisdll.WhoisServer
If you set this property before calling the 'whois' method, then the server specified will be used. Otherwise, this property contains the server used to perform the whois.
whoisdll.Error
If any error occured during a lookup, this property will hold a description of what the error was.
Example
The example uses a form and queries any domain name specified.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>WhoisDLL example</title>
</head>
<body>
<form method>
Enter domain (no www or http://) to lookup
<input type="text" name="lookup" value="<%=Request.QueryString("lookup")%>"><br>
<input type="submit" value="lookup">
</form>
<%

If Request.QueryString("lookup") <> "" Then
Dim whoisdll
Dim result

Set whoisdll = Server.CreateObject("WhoisDLL.Whois")
result = whoisdll.whois(Request.QueryString("lookup"))
Response.Write "Whois server: " & whoisdll.WhoisServer & "<BR>"
Response.Write whoisdll.nl2br(result)
End If
%>
<body>
</html>
© sloppycode.net 2001