<%
'基于万网单一域名注册查询系统。
'转载请著名出处
'版权为 编程中国论坛 (http://bbs.bc-cn.net)及编程中国论坛成员hxfly共同所有
'因万网变更网页内容而引起的查询失败,作者不负任何责任
'多域名查询做法请参看万网查询系统地址代码
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
%>
<%
if request("domain")<>"" then
url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&request("domain")&"&ext="&request("root")
wstr=getHTTPPage(url)
if instr(lcase(wstr),"已被注册")>0 then
body="域名已经被注册"
elseif instr(lcase(wstr),"未被注册")>0 then
body="域名未被注册"
else
body="网络延迟,请重新查找"
end if
end if
%>
<table width="61%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
<tr>
<td height="26" bgcolor="#FFFFFF">域名查询系统:<font size="2" color="#0000FF">
<% if request("domain")>"" then response.Write(request("domain")&"."&request("root")&body) end if%></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><form name="form1" method="post" action=""><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="36"> <div align="center">www.
<input type="text" name="domain">
<select name="root" id="select">
<option value="cn" selected>.cn</option>
<option value="com">.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="com.cn">.com.cn</option>
<option value="net.cn">.net.cn</option>
<option value="gov.cn">.gov.cn</option>
</select>
</div></td>
</tr>
<tr>
<td height="35">
<div align="center">
<input type="submit" name="Submit" value=" 查 询 ">
</div>
<div align="center"></div></td>
</tr>
</table></form></td>
</tr>
</table>