Check a Domain Name 
Client Login  
 
 
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 queries Internic.net for the whois server and then queries the whois server for that domain.
Server.ScriptTimeout = 30
DomainName = Trim(Request("DomainName"))
DomainName = Replace(DomainName,"http://","",vbTextCompare)
DomainName = Replace(DomainName,"www.","",vbTextCompare)
Set whoisdll = Server.CreateObject("WhoisDLL.Whois") 
whoisdll.WhoisServer = "whois.internic.net"
Result = ""
Result = whoisdll.whois(Trim(DomainName))
StartPos = InStr(Result,"Whois Server:")
If StartPos > 0 Then
	StartPos = StartPos + Len("Whois Server:")
	EndPos = InStr(StartPos,Result,vblf)
	WhoisServer = Trim(Mid(Result,StartPos,EndPos-StartPos))
	Set whoisdll = Server.CreateObject("WhoisDLL.Whois") 
	whoisdll.WhoisServer = WhoisServer
	Result = ""
	Result = whoisdll.whois(Trim(DomainName))
	WhoisResult = Result
Else
	If InStr(1,Result,"No match for",vbTextCompare) > 0 Then 
		Response.Write "DOMAIN AVAILABLE"
	End If
End If	
 
             Copyright ®2009 Terrasite.com      Home   l    Service Agreement   l    Acceptable Use Policy   l    Privacy Policy Thursday, July 02, 2009