📄 domain_search.asp
字号:
<!--#include file="conn.asp" -->
<%
'常用函数
'1、输入url目标网页地址,返回值getHTTPPage是目标网页的html代码
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
end function
'2、转换乱玛,直接用xmlhttp调用有中文字符的网页得到的将是乱玛,可以通过adodb.stream组件进行转换
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
'下面试着调用OnlineNIC的html内容
Dim Url,Html,MM
Url="https://www.onlinenic.com/cgi-bin/chinese/check_domain.cgi?type_encode=1&domain="&request("domain")&"&root="&request("ext")
Html = getHTTPPage(Url)
if instr(Html,"没有被注册") then
ext=request("ext")
n=len(ext)
ext2=right(ext,n-1)
MM = "恭喜,您查询的域名<font color=#ff0000>"&request("domain")&request("ext")&"</font>可以注册!<a href=buy_domain.asp?domain="&request("domain")&"&ext="&ext2&"><img src=images/regdn.gif width=90 height=22 border=0></a>"
else
MM = "抱歉,您查询的域名<font color=#ff0000>"&request("domain")&request("ext")&"</font>不能注册,请 <a href=domain.asp>重新查询</a> 。"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE><%=page_name%> – <%=page_title%></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="images/style.css" type=text/css rel=stylesheet>
<SCRIPT src="images/Domain.js"></SCRIPT>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
</HEAD>
<BODY leftMargin=0 background=images/bg.jpg topMargin=0 marginheight="0"
marginwidth="0">
<!--#include file="head.asp" -->
<TABLE height=613 cellSpacing=0 cellPadding=0 width=760 align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD colSpan=3 height=1><div align="center"><img src="images/banner_domain.gif" width="760" height="129"></div></TD>
</TR>
<TR>
<TD height="2" colspan="3" bgColor=#999999><IMG height=1 src="images/spacer.gif"
width=8></TD>
</TR>
<TR>
<TD width=136 height=480 vAlign=top background="images/bg_l.gif"><TABLE height=122 cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width="100%" height=104><P align=center><IMG src="images/dr2.gif"> </P></TD>
</TR>
<TR>
<TD width="100%" height=18></TD>
</TR>
</TBODY>
</TABLE></TD>
<TD width="592" height=480 valign="top"><TABLE height=158 cellSpacing=0 cellPadding=0 width=566 align=center
border=0>
<TBODY>
<TR>
<TD height=20> </TD>
</TR>
<TR>
<TD height="25"><% =MM %></TD>
</TR>
<TR>
<TD height=1></TD>
</TR>
<TR>
<TD height=116></TD>
</TR>
<TR>
<TD height=1></TD>
</TR>
</TABLE></TD>
<TD width=32 background=images/bg_r.gif height=480><IMG height=1
src="" width=32 border=0></TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
<TBODY>
<TR>
<TD bgColor=#999999><IMG height=1 src="images/spacer.gif"
width=1></TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="foot.asp" -->
<%conn.close
set conn= nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -