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:
Code: [Copy to Clipboard]
<% @ language=vbscript%>
<%
Dim Domain,socket
Domain = "91now" here take 91now 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>