多域名后缀同时查询的域名查询系统
多域名后缀同时查询的域名查询,代码非常简洁:
<%
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.xml(标准化越来越近了)http")
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.acnow.net如果提交了查询
if request.form("yes") <> "" then
yes = replace(request.form("yes")," ","") 去除复选框字符串中的空格
yes = split(yes,",") 实例化一个数组yes,将用逗号隔开的yes数组赋值给yes新数组
for i = 0 to ubound(yes) 遍历数组循环开始
url = "https://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 = "https://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="查询">