快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

多个域名后缀同时查询的域名查询系统

写的很简朴,只是实现了功能

<%
Function formaturl(yes)
If mid(yes,5,1)<>"" then
yes1 = left(yes,3)
yes2 = right(yes,cint(len(yes))-3)
formaturl = yes1 & "." & yes2
else
formaturl=yes
end if
End Function
\\\'取得远程网页二进制源代码
Function getBoy(url)
\\\'on error resume next
Set objXml = Server.CreateObject("Microsoft.XmlHttp")
with objXml
.open "get",url,false,"",""
.send
getBoy = .responsebody
end with
getBoy = BytesToBstr(GetBoy,"GB2312")
Set objXml = nothing
end function

\\\'处理二进制流代码
Function BytesToBstr(strBody,CodeBase)
dim objStream
set objStream = Server.CreateObject("Adodb.Stream")
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write strBody
objStream.Position = 0
objStream.Type = 2
objStream.Charset = CodeBase
BytesToBstr = objStream.ReadText
objStream.Close
set objStream = nothing
End Function
%>
未注册的域名如下
<%
If Request.Form("yes") <> "" Then
yes = replace(Request.Form("yes")," ","") \\\'去除复选框字符串中的空格
yes = split(yes,",") \\\'实例化一个数组yes,将用逗号隔开的yes数组赋值给yes新数组

For i = 0 to ubound(yes) \\\'遍历数组循环开始
url = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr = getBoy(url) \\\'获取查询后的源代码
If instr(wstr,"未被注册的域名") <> 0 Then \\\'判定是否为已经注册的域名
Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" \\\'列出未注册的域名
End If
Next
response.Write "<p><p><p>已注册的域名如下:<br>"
For i = 0 to ubound(yes) \\\'遍历数组循环开始
url = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr = getBoy(url) \\\'获取查询后的源代码
If instr(wstr,"已被注册的域名") <> 0 Then \\\'判定是否为已经注册的域名
Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" \\\'列出已注册的域名
End If
Next

Else

%>
<form name="form1" method="post" action="">
<p>
<input name="domain" type="text" id="domain">
<input type="submit" name="Submit" value="查询">
</p>
<p>
<input name="yes" type="checkbox" id="yes" value="com">
.com
<input name="yes" type="checkbox" id="yes" value="net">
.net
<input name="yes" type="checkbox" id="yes" value="org">
.org </p>
<p>
<input name="yes" type="checkbox" id="yes" value="comcn">
.com.cn
<input name="yes" type="checkbox" id="yes" value="netcn">
.net.cn
<input name="yes" type="checkbox" id="yes" value="orgcn">
org.cn
<input name="yes" type="checkbox" id="yes" value="govcn">
gov.cn </p>
<p>
<input name="yes" type="checkbox" id="yes" value="info">
.info
<input name="yes" type="checkbox" id="yes" value="biz">
.biz
<input name="yes" type="checkbox" id="yes" value="tv">
.tv
<input name="yes" type="checkbox" id="yes" value="cc">
.cc</p>
<p>
<input name="yes" type="checkbox" id="yes" value="cn">
.cn
<input name="yes" type="checkbox" id="yes" value="name">
.name </p>
</form>
<%
End If
%>
返回类别: 教程
上一教程: 制作我们自己的EBAY(拍卖系统)(5)
下一教程: 关于“禁用浏览器后退按钮”

您可以阅读与"多个域名后缀同时查询的域名查询系统"相关的教程:
· 新手初练:用ASP做一个域名查询系统
· 使用XMLHTTP制作域名查询系统
· 多个域名绑定一个空间互不影响
· 使用W3SOCKETS组件实现域名查询功能
· 最简洁的多重查询的解决方案
    微笑服务 优质保证 索取样品