Voodoo published in 2000-06-03 22:42:07<%@ language=vbscript%>
<HTML>
<HEAD>
<meta name= "generator" content= "Microsoft Visual Studio 6.0" >
</HEAD>
<BODY>
<form action=whois.asp method=post>
Domain name:www<b>.</b> <input size=8 name=domainname value= "<% =request" DomainName "". <select name=ext>
<option selected>com</option>
<OPTION>net</OPTION>
<OPTION>org</OPTION>
<OPTION>com.cn</OPTION> <OPTION>net.cn</OPTION> <OPTION>org.cn</OPTION>
</SELECT>
<input class=input1 type=submit value= domain name Query name=submit>
</form>
<%
Dim strresult
If Request.ServerVariables ("request_method") = "POST" THEN
Dim strquery
' Get the domain name you want to query
Strquery=request ("domainname") & "." & Request ("ext")
Dim Objsock
' Create a Sock object
Set objsock=server.createobject ("Aspsock.conn")
' Set the WHOIS server to Rs.internic.net
Select Case Request ("ext")
Case "com", "net", "org"
Objsock.remotehost= "Rs.internic.net"
Gj=0
Case "com.cn", "net.cn", "org.cn"
Objsock.remotehost= "drop.cnnic.net.cn"
Gj=1
End Select
' Set WHOIS server port to 43
objsock.port=43
' Set timeout of 60 seconds for operation
Objsock.timeout=60
' Open connection with RemoteHost, return true to success
If Objsock.open Then
' Send query Writeln for VBCRLF end (Strquery & VBCRLF)
Objsock.writeln strquery
' Read the return value with a maximum length of 65535
Strresult=objsock.readbytesasstring (65535)
' Close the connection
Objsock.close
' Print the query results, you can do something about it
' Response.Write ' <b> query results </b><br><textarea rows=10 cols=60> "& Strresult &" </ Textarea> "
Select Case
Case "0"
Str1=inter (Strresult)
Response.Write str1
Response.Write "<b> Query results </b><br><textarea rows=10 cols=60>" & Strresult & "</ Textarea> "
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.