[域名被墙 查询]域名登记查询(whois)很复杂吗--方法二

时间:2014-02-13  来源:域名投资  阅读:
voodoo发表于 2000-06-03 22:42:07<%@ Language=VBScript %>






域名:www. ">.


<%
dim strResult
if Request.ServerVariables("request_method")="POST" THEN
dim strQuery
"取得需要查询的域名
strQuery=request("domainname") & "." & request("ext")
dim objSock
"创建sock对象
Set objSock=Server.CreateObject("Aspsock.conn")
"设置whois服务器为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
"设置whois服务器端口为43
objSock.Port=43
"设置操作的超时为60秒
objSock.TimeOut=60
"打开与remotehost的连接,返回真为成功
if objSock.Open then
"发出查询 WriteLn表示用vbCrlf终结(strQuery & vbCRlf)
objSock.WriteLn strQuery
"读取返回值,最大长度为65535
strResult=objSock.ReadBytesAsString(65535)
"关闭连接
objSock.Close
"打印查询结果,你可以需要对此作些处理
" Response.Write "查询结果
"
select case gj
case "0"
str1=inter(strresult)
response.write str1
Response.Write "查询结果
"

[域名被墙 查询]域名登记查询(whois)很复杂吗--方法二

http://m.bbyears.com/wangzhanyunying/4152.html

推荐访问:域名备案查询 ip
相关阅读 猜你喜欢
本类排行 本类最新