欢迎光临
我们一直在努力

多个域名后缀同时查询的域名查询系统-ASP教程,ASP应用

建站超值云服务器,限时71元/月

 

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

<%
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
%>
未注册的域名如下
<%
www.knowsky.com如果提交了查询
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
%>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 多个域名后缀同时查询的域名查询系统-ASP教程,ASP应用
分享到: 更多 (0)