多个域名后缀同时查询的域名查询系统
<DIV class=Content><SPAN class=t18><P>写的很简单,只是实现了功能</P>
<P><%<BR>Function formaturl(yes)<BR> If mid(yes,5,1)<>"" then<BR> yes1 = left(yes,3)<BR> yes2 = right(yes,cint(len(yes))-3)<BR> formaturl = yes1 & "." & yes2<BR> else<BR> formaturl=yes<BR> end if<BR>End Function <BR>'取得远程网页二进制源代码<BR>Function getBoy(url)<BR> 'on error resume next<BR> Set obj<A class=ReplaceKeyword href="http://www.knowsky.com/xml.asp" target=_blank>Xml</A> = Server.CreateObject("Microsoft.XmlHttp")<BR> with objXml<BR> .open "get",url,false,"",""<BR> .send<BR> getBoy = .responsebody<BR> end with<BR> getBoy = BytesToBstr(GetBoy,"GB2312")<BR> Set objXml = nothing <BR>end function</P>
<P>'处理二进制流代码<BR>Function BytesToBstr(strBody,CodeBase)<BR> dim objStream<BR> set objStream = Server.CreateObject("Adodb.Stream")<BR> objStream.Type = 1<BR> objStream.Mode =3<BR> objStream.Open<BR> objStream.Write strBody<BR> objStream.Position = 0<BR> objStream.Type = 2<BR> objStream.Charset = CodeBase<BR> BytesToBstr = objStream.ReadText <BR> objStream.Close<BR> set objStream = nothing<BR>End Function<BR>%><BR>未注册的域名如下<BR><%<BR>'www.knowsky.com如果提交了查询<BR>If Request.Form("yes") <> "" Then<BR> yes = replace(Request.Form("yes")," ","") '去除复选框字符串中的空格<BR> yes = split(yes,",") '实例化一个数组yes,将用逗号隔开的yes数组赋值给yes新数组<BR> <BR> For i = 0 to ubound(yes) '遍历数组循环开始<BR> url = "<A href='http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i'>http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i</A>)<BR> wstr = getBoy(url) '获取查询后的源代码<BR> If instr(wstr,"未被注册的域名") <> 0 Then '判断是否为已经注册的域名<BR> Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" '列出未注册的域名<BR> End If <BR> Next<BR> response.Write "<p><p><p>已注册的域名如下:<br>"<BR> For i = 0 to ubound(yes) '遍历数组循环开始<BR> url = "<A href='http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i'>http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i</A>)<BR> wstr = getBoy(url) '获取查询后的源代码<BR> If instr(wstr,"已被注册的域名") <> 0 Then '判断是否为已经注册的域名<BR> Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" '列出已注册的域名<BR> End If <BR> Next<BR> <BR>Else </P>
<P>%><BR><form name="form1" method="post" action=""><BR> <p><BR> <input name="domain" type="text" id="domain"><BR> <input type="submit" name="Submit" value="查询"><BR> </p><BR> <p><BR> <input name="yes" type="checkbox" id="yes" value="com"> <BR> .com<BR> <input name="yes" type="checkbox" id="yes" value="net"><BR>.net <BR><input name="yes" type="checkbox" id="yes" value="org"> <BR>.org </p><BR> <p><BR> <input name="yes" type="checkbox" id="yes" value="comcn"> <BR> .com.cn<BR> <input name="yes" type="checkbox" id="yes" value="netcn"> <BR> .net.cn <BR> <input name="yes" type="checkbox" id="yes" value="orgcn"><BR>org.cn <BR><input name="yes" type="checkbox" id="yes" value="govcn"> <BR>gov.cn </p><BR> <p><BR> <input name="yes" type="checkbox" id="yes" value="info"> <BR> .info<BR> <input name="yes" type="checkbox" id="yes" value="biz"><BR>.biz <BR><input name="yes" type="checkbox" id="yes" value="tv"> <BR>.tv <BR><input name="yes" type="checkbox" id="yes" value="cc"> <BR>.cc</p><BR> <p><BR> <input name="yes" type="checkbox" id="yes" value="cn"> <BR> .cn <BR> <input name="yes" type="checkbox" id="yes" value="name"><BR>.name </p><BR></form><BR><%<BR>End If<BR>%></P></SPAN><!--正文内容结束--></DIV>
页:
[1]