- 热门文章:
- · asp模块化分页
- · ASP分页显示详论
- · Iframe高度自适应
- · 正则表达式大全
- · WMI学习
- · Session 详解
- · 关于交叉报表的动态实现
- · 页面执行需要长时间时向用户的提示信息
- · 使用Repeater模板 二
- · Sucess On a Horse
- · 校友通讯资料管理系统(1)
- · ASP实现图片上存
上一篇:被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>
<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="#FFFFFF">
<FORM name=search_form action=‘’http://search.sohu.com/web‘’ method=get target=_blank>
<div align="center">
<input type="hidden" name="pid" value="hljec">
<input name="query" type="text" style="font-size:14px;width:150" value="好域名">
<input type="submit" name="ss" value="查看" onclick=document.search_form.action=‘’http://search.sohu.com/web‘’ style="font-size:14px;width=40;height=20">
</div>
</FORM></td>
</tr>
</table>
代码我已经在本地测试过了。正常通过。
下一篇:asp模块化分页 >>
相关文章:
- · 提高网站在搜索引擎中的排名
- · 关于无组上传的老话题
- · 如何实现图片的随机生成与显示
- · 怎么把webapplication打包成安装文件
- · 为treeview添加客户端事件
- · 如何让不同的语言版本显示正确的中文?
- · 线程的处理(2)
- · 线程的处理(1)
- · 再谈ASP防止SQL Injection漏洞的问题
- · 用asp编写文档搜索页面
- · ASP中使用SQL语句
- · 利用反射动态调用类成员
- · Asp.net组件设计浅论
- · 越过调试这道槛——ASP.NET无法调试问题剖析
- · 一段用ASP查看ASP文件源码的程序.
- · ASP显示在线人数
- · Asp.net多页面间保留状态
- · 简单ASP计数器
- · 使用 HttpContext.RewritePath 来配合 Server.Transfer/Execute
- · SQLSERVER扩展存储过程XP_CMDSHELL的简单应用
- · SQL Server 存储过程的分页
- · 经典的asp整理
- · Access中分组统计的实例
- · 一段分页程序实例代码!
- · 从asp到asp.net之快速转型
- · ASP升级程序
- · 利用WebClient类向服务器上载文件
- · .net中Web自定义控件编写的几个注意事项
- · 奇妙的.NET之Web程序中使用windows弹出框
- · webservice.htc无法传递中文数据的解决
- · 用反射调用别人的.NET程序里的类和方法
- · DataView如何绑定Web Service返回的主从表数据集
- · 在类中添加断言
- · UBB代码的实现(ASP)
- · 精确的判断网络是否可用
- · 调试SharePoint web part时, 如何可以多个人同时启动调试?
- · 关于编译器失败,错误代码为 128。的解决方案
- · 如何实现将用户上传的文件生成缩略图!
