W3sockets is another free and useful ASP component developed by the famous JMail Mail component developer.
Friends who need to download here can download:
http://www.dimac.net/FreeDownloads/dlstart.asp?ProductID=2
Unzip after downloading, run SocketReg.exe registration component.
Here mainly describes how to use the component Whois domain name, the current online many domain name query system is through XMLHTTP access to other web data, and get records. In fact, we can fully implement the function of Whois by w3sockets ourselves.
The program code is as follows:
<% @ language=vbscript%>
<%
Dim Domain,socket
Domain = "Knowsky" ' here take Knowsky as an example
Set socket = Server.CreateObject ("socket.tcp") ' Creates a socket object
function whois (Domain, Server)
Socket. Host = Server + ": 43" ' Set the address
Socket. Open () opens
Socket. Sendline (Domain) ' Pass variables
Socket. Waitfordisconnect ()
Response.Write ("<blockquote><pre>" + socket. Buffer + "</pre></blockquote>") ' Get content
Socket. Close () ' Off
End Function
%>
<body bgcolor= "#FFFFFF" text= "#000010" link= "#0000C0" vlink= "#000040" alink= "#000040" >
<%call whois (domainname + ". com", "rs.internic.net")%>
<%call whois (domainname + ". Net", "Rs.internic.net")%>
<%call whois (domainname + ". org", "rs.internic.net")%>
</body>