📄 domainsearch.asp
字号:
<!--#include file="conn.asp"-->
<%
on error resume next
domain1=request("domain")
ext1=request("ext")
Dim Retrieval,Domain,TakenHTML,pagebefore,pageafter,zyj
Private Function bytes2BSTR(vIn)
Dim i, ThischrCode, NextchrCode
strReturn = ""
For i = 1 To LenB(vIn)
ThischrCode = AscB(MidB(vIn, i, 1))
If ThischrCode < &H80 Then
strReturn = strReturn & Chr(ThischrCode)
Else
NextchrCode = AscB(MidB(vIn, i + 1, 1))
strReturn = strReturn & Chr(CLng(ThischrCode) * &H100 + CInt(NextchrCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
Function GetURL(url)
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False, "", ""
.Send
GetURL = .ResponseText
GetURL = bytes2BSTR(.Responsebody)
End With
Set Retrieval = Nothing
End Function
if request("ext")<>"" then
Domain = Replace(Request("domain"),"www.","") & "." & Request("ext")
else
Domain = domain1
end if
if Domain=".com" or Request("domain")="" then
Response.Write ("<script>alert('请您正确填写要查询域名');javascript:history.back(1)</script>")
response.end
end if
if request("ext")<>"" then
select case Request("ext")
case "biz"
TakenHTML = GetURL("http://www.onlinenic.com/cgi-bin/english/biz_whois.cgi?domain=" &Domain)
pageafter = "<P>"
pagebefore = "</tr>"
case "info"
TakenHTML = GetURL("http://www.onlinenic.com/cgi-bin/english/info_whois.cgi?domain=" &Domain)
pageafter = "<pre>"
pagebefore = "</pre>"
case "tv"
TakenHTML = GetURL("http://www.onlinenic.com/cgi-bin/english/tv_whois.cgi?domain=" &Domain)
pageafter = "<pre>"
pagebefore = "</pre>"
case "cc"
TakenHTML = GetURL("http://whois.nic.cc/cgi-bin/globalwhois.pl?DOMAIN=" &Domain)
pageafter = "<TD VALIGN=top>"
pagebefore = "<!-- begin included footer -->"
case "网络"
TakenHTML = GetURL("http://cwhois.cnnic.net.cn/whois.jsp?entityname=domain&queryinfo=" &Domain)
pageafter = "<table border=1 cellspacing=0 cellpadding=2>"
pagebefore = "</table>"
case "中国"
TakenHTML = GetURL("http://cwhois.cnnic.net.cn/whois.jsp?entityname=domain&queryinfo=" &Domain)
pageafter = "<table border=1 cellspacing=0 cellpadding=2>"
pagebefore = "</table>"
case "公司"
TakenHTML = GetURL("http://cwhois.cnnic.net.cn/whois.jsp?entityname=domain&queryinfo=" &Domain)
pageafter = "<table border=1 cellspacing=0 cellpadding=2>"
pagebefore = "</table>"
case else
if InStr(Request("ext"),"cn")<>0 then
TakenHTML = GetURL("http://nm.cnnic.net.cn/cgi-bin/srdp_new.cgi?domain=" &Domain)
pageafter = "<TABLE ALIGN=""center"" CELLSPACING=""0"" BORDER=""0"" CELLPADDING=""0"""
pagebefore = "</TABLE>"
else
TakenHTML = GetURL("http://www.china-channel.com/checkdomain.asp?action=whois&domain=" & Domain)
pageafter = "<pre>"
pagebefore = "</pre>"
end if
end select
else
TakenHTML = GetURL("http://seal.cnnic.net.cn/queryserver?nameInfo=" & Domain & "&entityName=keyword")
pageafter = "<table border=1 cellspacing=0 cellpadding=2>"
pagebefore = "</table>"
end if
'#################################查询域名的详细注册情况的代码开始####################################
Function dowith()
Dim tempcontent
Dim pagestart
Dim pageend
tempcontent = TakenHTML
pagestart = InStr(1,tempcontent, pageafter,1)
If pagestart = 0 Then
dowith = "对不起,暂时无法得到此域名的详细注册信息."
Exit Function
Else
pagestart = pagestart + Len(pageafter) + 1
pageend = InStr(pagestart, tempcontent, pagebefore,1)
If pageend = 0 Then
dowith = "对不起,暂时无法得到此域名的详细注册信息!"
d_exsit = 3
Exit Function
Else
pageend = pageend - pagestart '得到内容长度
tempcontent = Mid(tempcontent, pagestart, pageend)
End If
End If
dowith = tempcontent
if Request("ext") <> "cc" then dowith = "<pre>" + dowith + "</pre>"
if InStr(Request("ext"),"cn") <> 0 then dowith = "<TABLE ALIGN=" + dowith + "</TABLE>"
if InStr(Request("ext"),"网络") <> 0 then dowith = "<TABLE WIDTH=500 ALIGN=CENTER><TBODY><TR><TD WIDTH=150>" + dowith + "</TABLE>"
if InStr(Request("ext"),"中国") <> 0 then dowith = "<TABLE WIDTH=500 ALIGN=CENTER><TBODY><TR><TD WIDTH=150>" + dowith + "</TABLE>"
if InStr(Request("ext"),"公司") <> 0 then dowith = "<TABLE WIDTH=500 ALIGN=CENTER><TBODY><TR><TD WIDTH=150>" + dowith + "</TABLE>"
if request("ext") = "" then dowith = "<TABLE WIDTH=500 ALIGN=CENTER><TBODY><TR><TD WIDTH=150>" + dowith + "</TABLE>"
End Function
'#################################查询域名的详细注册情况的代码结束####################################
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<LINK href="style.css" rel=stylesheet>
<title>域名查询</title>
</head>
<body>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="758">
<tr>
<td>
<p align="center"><!--#include file="head.asp"--></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="758">
<tr>
<td width="179"><!--#include file="left.asp"--></td>
<td width="577" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="1">
<tr>
<td width="100%" background="pic/line_gb.gif" height="1"></td>
</tr>
</center>
<tr>
<td width="100%" height="14" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="175">
<tr>
<td width="100%" bgcolor="#EEEEEE" height="20">
<p align="center">域 名 查 询 系 统</p>
</td>
</tr>
<center>
<tr>
<td width="100%" height="19">
<p align="center"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
<tr>
<td width="100%" height="17"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="758">
<tr>
<td>
<p align="center"><!--#include file="end.asp"--></td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -