我爱Aspx >> C#.Net >> 用ASP做一个域名查询系统1 2 下一页
开发这样一个域名查询系统其实是一件很容易的事情,只要我们能够让使用者进行查询后得出结果,看看自己输入的域名是不是被别人占用了就可以,如果没有被占用我们就可以自行去申请了。
<%
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)
''response.write Instr (wstr,"可以注册")
if instr(lcase(wstr),"已被注册的域名")>0 then
body="域名已经被注册"
elseif instr(lcase(wstr),"未被注册的域名")>0 then
body="域名未被注册"
else
body="网络延迟,请重新查找"
end if
end if
%>
上一篇: ASP注册表项目修改
下一篇: 用VBScript制作定制的alert弹出消息框
1 2 下一页
Ҷƪл˵?
用ASP+XML打造留言本 - 1[05-12]
XML+JAVASCRIPT+ASP在线短信息功..[05-12]
XML+JAVASCRIPT+ASP在线短信息功..[05-12]
利用ASP木马程序获取管理权限[05-12]
ASP与JSP的比较(1)[05-12]
ASP 3.0高级编程(一)[05-12]
ASP 3.0高级编程(二)[05-12]
ASP 3.0高级编程(三)[05-12]
ASP讲座之九:ASP与数据库(四)[05-12]
ASP讲座之四:ASP内置组件[05-12]
股票报价的WebService之四[05-12]
用ASP+XML打造留言本 - 1[05-12]
XML+JAVASCRIPT+ASP在线短信息功..[05-12]
XML+JAVASCRIPT+ASP在线短信息功..[05-12]
排序方式解决“上下主题”问题(..[05-12]
用VB创建FTP组件(get)[05-12]
用VBScript制作定制的alert弹出消..[05-12]
汉字转化为拼音[05-12]
利用ASP木马程序获取管理权限[05-12]
『VC++技术内幕』学习笔记(2)[05-12]