<HTML>
<HEAD>
<title>域名查询</title><%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
t = GetBody(Path)
getHTTPPage=BytesToBstr(t,"GB2312")
End function
Function GetBody(url)
on error resume next
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False, "", ""
.Send
GetBody = .ResponseBody
End With
Set Retrieval = Nothing
End Function
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
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<body>
<%
if request.Form("Submit")="查询" then
types=split(request.form("checkbox"),",") '获取当前选择的类型
dns=trim(request.form("dns"))
for i=0 to ubound(types)
ext=replace(trim(types(i)),".","")
'url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="& dns &"&ext="&trim(types(i))
url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="& dns &"&ext="&ext
wstr=getHTTPPage(url)
if instr(lcase(wstr),"已被注册的域名")>0 then
mes="已被注册!"
elseif instr(lcase(wstr),"未被注册的域名")>0 then
mes="未被注册!"
else
mes="网络延迟,请重新查找!"
end if
response.write dns & "." & trim(types(i)) & ":" & mes & "<br/>"
next
elseif request.Form("Submit")="中文查询" then
alert("fdfdfdfd")
types=split(request.form("checkbox"),",") '获取当前选择的类型
dns=trim(request.form("dnsmain"))
for i=0 to ubound(types)
ext=replace(trim(types(i)),".","")
'url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="& dns &"&ext="&trim(types(i))
url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="& dns &"&ext="&ext
wstr=getHTTPPage(url)
if instr(lcase(wstr),"已被注册的域名")>0 then
mes="已被注册!"
elseif instr(lcase(wstr),"未被注册的域名")>0 then
mes="未被注册!"
else
mes="网络延迟,请重新查找!"
end if
response.write dns & "." & trim(types(i)) & ":" & mes & "<br/>"
next
end if
%>
<form name="form1" method="post" onSubmit="javascript:return check()">
<script language="JavaScript">
<!--
function check()
{
if (form1.dns.value=="")
{
alert("请输入域名");
form1.dns.focus();
return false;
}
if(form1.dns.value.length < 3 )
{
alert("域名不能少于三位");
form1.dns.focus();
return false;
}
}
//-->
</script>
<table width="431" height="144" border="0" align="center" cellpadding="0" cellspacing="0"
id="TABLEE">
<tr>
<td align=left height=11>
<table width="423" height="41" border="0" align="center" cellpadding="0" cellspacing="0"
id="TABLE1">
<TR>
<TD width="200">英文域名查询:</TD>
<td></td>
</TR>
<TR>
<TD width="200">www. <INPUT id="dns" type="text" size="18" name="dns"></TD>
<TD width="85"><INPUT type=submit value=查询 name=Submit></TD>
</TR>
</table>
</td>
</tr>
<tr>
<td height=100>
<table align="center" id="tablechecke">