新手初练:用ASP做一个域名查询系统
来源:互联网 发布:域名备案成功 编辑:程序博客网 时间:2024/05/01 12:18
新手初练:用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)
'response.write Instr (wstr,"可以注册")
if instr(lcase(wstr),"已被注册的域名")>0 then
body="域名已经被注册"
elseif instr(lcase(wstr),"未被注册的域名")>0 then
body="域名未被注册"
else
body="网络延迟,请重新查找"
end if
end if
%>
<table width="40%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
<tr>
<td height="26" bgcolor="efefef">域名查询系统:<% if request("domain")>"" then response.Write(request("domain")&"."&request("root")&body) end if%></td>
<tr>
<td bgcolor="#FFFFFF"><form name="form1" method="post" action=""><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="36"> <div align="center">www.
<input type="text" name="domain">
<select name="root" id="select">
<option value="cn" selected>.cn</option>
<option value="com">.com</option>
<option value="net">.net</option>
<option value="org">.org</option>
<option value="com.cn">.com.cn</option>
<option value="net.cn">.net.cn</option>
<option value="gov.cn">.gov.cn</option>
</select>
</div></td>
</tr>
<tr>
<td height="35">
<div align="center">
<input type="submit" name="Submit" value=" 查 询 ">
</div>
<div align="center"></div></td>
</tr>
</table></form></td>
</tr>
</table>
<p align="center"> </p>
<table width="40%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
<tr>
<td height="42" bgcolor=&0000ff;>
- 新手初练:用ASP做一个域名查询系统
- 域名查询系统--适合新手
- ASP.NET域名查询系统
- ASP.NET中的域名查询系统
- 用asp.net+access做光盘查询系统
- ASP.NET域名查询系统源代码,域名Whois查询,(.Com/.Net/.Org/.Cn),c#语言实现域名Whois信息查询
- asp+初体验---用c#写的asp+域名查询程序
- asp域名状态查询接口
- 如何查询一个域名的子域名
- 用ASP.Net编写的查询域名的程序
- 用ASP.Net编写的查询域名的程序
- 用ASP.Net编写的查询域名的程序
- 用ASP.Net编写的查询域名的程序
- 域名系统(DNS)反向查询
- 一个域名查询的程序
- 终于做了一个用asp做了一个form!
- 用微信公众号做一个天气查询系统内
- 用ASP实现一个空间多个域名
- 养生系列 之 百合莲子豆浆的做法
- ubuntu14.04 64位安装longeneQQ遇到的问题
- 开发在ios平台开发游戏了
- ubuntu 12.04 解压安装jdk
- hdu 2429 Word Game(矩阵)
- 新手初练:用ASP做一个域名查询系统
- ASP.NET编程中的十大技巧
- 马上就要离开了
- 防止网站重复投票
- 运行asp脚本的asp脚本(原作:V37)
- 编译Boost 详细步骤 适用 VC6 VS2003 VS2005 VS2008 VS2010
- 【C语言天天练(零)】变量的存储类型
- 《影响力》读书笔记
- 一个关于ACE Service Configurator的小例子