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")&"&"
root=trim(Replace(Request.Form("root")," ",""))
root="com,"&root
Allroot=split(root,",")
for i=0 to ubound(Allroot)
newurl=url&Allroot(i)&"=yes"
wstr=wstr&"|||"&getHTTPPage(newurl)
newurl=""
next
flag=split(wstr,"|||")
for i=1 to ubound(flag)
if instr(lcase(flag(i)),"已被注册的域名")>0 then
body="域名已经被注册"
elseif instr(lcase(flag(i)),"未被注册的域名")>0 then
body="域名未被注册"
else
body="网络延迟,请重新查找"
end if
Response.Write(Request.Form("domain")&"."&Allroot(i)&body&"<br/>")
next