我爱Aspx >> C#.Net >> 使用XMLHTTP制作域名查询系统_ASP实例
<%
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/Whois.cgi?domain="&request("domain")&"&"&request("root")&"=yes&work=whois&referer=http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&request("domain")
url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&request("domain")&"&ext="&request("root")
wstr=getHTTPPage(url)
'www.knowsky.com
'response.write Instr (wstr,"可以注册")
if instr(lcase(wstr),"已被注册的域名")>0 then
Ҷƪл˵?
Delphi编写组件封装asp代码的基本..[04-28]
采用XMLHTTP编写一个天气预报的程..[04-28]
菜鸟详听ASP中也能解压缩rar文件..[04-28]
用Asp+XmlHttp实现RssReader功能..[04-28]
纯ASP代码之公历转农历实现(含属..[04-28]
纯ASP代码之公历转农历实现(含属..[04-28]
实例讲解ASP实现抓取网上房产信息..[04-28]
asp提供在线文章翻译的功能_ASP实..[04-28]
多个域名后缀同时查询的域名查询..[04-28]
ASPImage组件的实现过程_ASP实例[04-28]
Delphi编写组件封装asp代码的基本..[04-28]
采用XMLHTTP编写一个天气预报的程..[04-28]
菜鸟详听ASP中也能解压缩rar文件..[04-28]
用Asp+XmlHttp实现RssReader功能..[04-28]
纯ASP代码之公历转农历实现(含属..[04-28]
纯ASP代码之公历转农历实现(含属..[04-28]
实例讲解ASP实现抓取网上房产信息..[04-28]
asp提供在线文章翻译的功能_ASP实..[04-28]
多个域名后缀同时查询的域名查询..[04-28]
ASPImage组件的实现过程_ASP实例[04-28]