asp下多个域名后缀同时查询的域名查询系统
2018-09-06 11:25
写的很简单,只是实现了功能
<%
Functionformaturl(yes)
Ifmid(yes,5,1)<>then
yes1=left(yes,3)
yes2=right(yes,cint(len(yes))-3)
formaturl=yes1&.&yes2
else
formaturl=yes
endif
EndFunction
取得远程网页二进制源代码
FunctiongetBoy(url)
onerrorresumenext
SetobjXml=Server.CreateObject(Microsoft.XmlHttp)
withobjXml
.openget,url,false,,
.send
getBoy=.responsebody
endwith
getBoy=BytesToBstr(GetBoy,GB2312)
SetobjXml=nothing
endfunction
处理二进制流代码
FunctionBytesToBstr(strBody,CodeBase)
dimobjStream
setobjStream=Server.CreateObject(Adodb.Stream)
objStream.Type=1
objStream.Mode=3
objStream.Open
objStream.WritestrBody
objStream.Position=0
objStream.Type=2
objStream.Charset=CodeBase
BytesToBstr=objStream.ReadText
objStream.Close
setobjStream=nothing
EndFunction
%>
未注册的域名如下
<%
如果提交了查询
IfRequest.Form(yes)<>Then
yes=replace(Request.Form(yes),,)去除复选框字符串中的空格
yes=split(yes,,)实例化一个数组yes,将用逗号隔开的yes数组赋值给yes新数组
Fori=0toubound(yes)遍历数组循环开始
url=
wstr=getBoy(url)获取查询后的源代码
Ifinstr(wstr,未被注册的域名)<>0Then判断是否为已经注册的域名
Response.WriteRequest.Form(domain)&.&formaturl(yes(i))&<br><br><br><br>列出未注册的域名
EndIf
Next
response.Write<p><p><p>已注册的域名如下:<br>
Fori=0toubound(yes)遍历数组循环开始
url=
wstr=getBoy(url)获取查询后的源代码
Ifinstr(wstr,已被注册的域名)<>0Then判断是否为已经注册的域名
Response.WriteRequest.Form(domain)&.&formaturl(yes(i))&<br><br><br><br>列出已注册的域名
EndIf
Next
Else
%>
<formname=form1method=postaction=>
<p>
<inputname=domaintype=textid=domain>
<inputtype=submitname=Submitvalue=查询>
</p>
<p>
<inputname=yestype=checkboxid=yesvalue=com>
<inputname=yestype=checkboxid=yesvalue=net>
<inputname=yestype=checkboxid=yesvalue=org>
<p>
<inputname=yestype=checkboxid=yesvalue=comcn>
<inputname=yestype=checkboxid=yesvalue=netcn>
<inputname=yestype=checkboxid=yesvalue=orgcn>
<inputname=yestype=checkboxid=yesvalue=govcn>
gov.cn</p>
<p>
<inputname=yestype=checkboxid=yesvalue=info>
<inputname=yestype=checkboxid=yesvalue=biz>
<inputname=yestype=checkboxid=yesvalue=tv>
<inputname=yestype=checkboxid=yesvalue=cc>
<p>
<inputname=yestype=checkboxid=yesvalue=cn>
.cn
<inputname=yestype=checkboxid=yesvalue=name>
</form>
<%
EndIf
%>
下一篇:文件名 正则表达式提取方法
文章标题:asp下多个域名后缀同时查询的域名查询系统
文章链接:http://soscw.com/index.php/essay/9362.html