It's very simple to write, but it just implements the function
<%
Functionformaturl(yes)
Ifmid(yes,5,1)<>""then
yes1=left(yes,3)
yes2=right(yes,cint(len(yes))-3)
formaturl=yes1&"."&yes2
else
formaturl=yes
endif
EndFunction
'Get remote web page binary source code
FunctiongetBoy(url)
'onerrorresumenext
SetobjXml=Server.CreateObject("Microsoft.XmlHttp")
withoutbjXml
.open"get",url,false,"","
.send
getBoy=.responsebody
endwith
getBoy=BytesToBstr(GetBoy,"GB2312")
SetobjXml=nothing
endfunction
'Processing binary stream code
FunctionBytesToBstr(strBody,CodeBase)
dimobjStream
setobjStream=Server.CreateObject("Adodb.Stream")
objStream.Type=1
objStream.Mode=3
objStream.Open
objStream.WritesstrBody
objStream.Position=0
objStream.Type=2
objStream.Charset=CodeBase
BytesToBstr=objStream.ReadText
objStream.Close
setobjStream=nothing
EndFunction
%>
The unregistered domain name is as follows
<%
'www.knowsky.com If a query is submitted
IfRequest.Form("yes")<>""Then
yes=replace(Request.Form("yes"),"","")'Remove spaces in the checkbox string
yes=split(yes,",")' Instantiate an array of yes and assign a comma-separated array of yes to the new array of yes
Fori=0toubund(yes)'Transfer the array loop starts
url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr=getBoy(url)'Get the source code after query
Ifstr(wstr,"unregistered domain name")<>0Then' determines whether it is a registered domain name
Response.WriteRequest.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br><br>"'List unregistered domain names
EndIf