ASP detects whether the domain name registers the code
<%
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
Dns=request ("DNS")
Ext=request ("ext")
E=split (ext, ",")
for I=0 to UBound (e)
edns=dns & "." & Trim (E (i))
url= "Http://www.che" ckdomain.com/cgi-bin/checkdomain.pl?domain= "&edns
wstr=gethttppage (URL)
if InStr (LCase ( WSTR), "registered") >0 then
Response.Write Edns & ": Registered <br>
else
& nbsp Response.Write Edns & ": Can register <br>
end if
next
%>
www.111cn.net/asp/asp.html