asp下多個(gè)域名后綴同時(shí)查詢的域名查詢系統(tǒng)
更新時(shí)間:2007年03月09日 00:00:00 作者:
寫(xiě)的很簡(jiǎn)單,只是實(shí)現(xiàn)了功能
<%
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
'取得遠(yuǎn)程網(wǎng)頁(yè)二進(jìn)制源代碼
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
'處理二進(jìn)制流代碼
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
%>
未注冊(cè)的域名如下
<%
'www.knowsky.com如果提交了查詢
If Request.Form("yes") <> "" Then
yes = replace(Request.Form("yes")," ","") '去除復(fù)選框字符串中的空格
yes = split(yes,",") '實(shí)例化一個(gè)數(shù)組yes,將用逗號(hào)隔開(kāi)的yes數(shù)組賦值給yes新數(shù)組
For i = 0 to ubound(yes) '遍歷數(shù)組循環(huán)開(kāi)始
url = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr = getBoy(url) '獲取查詢后的源代碼
If instr(wstr,"未被注冊(cè)的域名") <> 0 Then '判斷是否為已經(jīng)注冊(cè)的域名
Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" '列出未注冊(cè)的域名
End If
Next
response.Write "<p><p><p>已注冊(cè)的域名如下:<br>"
For i = 0 to ubound(yes) '遍歷數(shù)組循環(huán)開(kāi)始
url = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr = getBoy(url) '獲取查詢后的源代碼
If instr(wstr,"已被注冊(cè)的域名") <> 0 Then '判斷是否為已經(jīng)注冊(cè)的域名
Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" '列出已注冊(cè)的域名
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
%>
<%
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
'取得遠(yuǎn)程網(wǎng)頁(yè)二進(jìn)制源代碼
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
'處理二進(jìn)制流代碼
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
%>
未注冊(cè)的域名如下
<%
'www.knowsky.com如果提交了查詢
If Request.Form("yes") <> "" Then
yes = replace(Request.Form("yes")," ","") '去除復(fù)選框字符串中的空格
yes = split(yes,",") '實(shí)例化一個(gè)數(shù)組yes,將用逗號(hào)隔開(kāi)的yes數(shù)組賦值給yes新數(shù)組
For i = 0 to ubound(yes) '遍歷數(shù)組循環(huán)開(kāi)始
url = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr = getBoy(url) '獲取查詢后的源代碼
If instr(wstr,"未被注冊(cè)的域名") <> 0 Then '判斷是否為已經(jīng)注冊(cè)的域名
Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" '列出未注冊(cè)的域名
End If
Next
response.Write "<p><p><p>已注冊(cè)的域名如下:<br>"
For i = 0 to ubound(yes) '遍歷數(shù)組循環(huán)開(kāi)始
url = "http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&Request.Form("domain")&"&ext="&yes(i)
wstr = getBoy(url) '獲取查詢后的源代碼
If instr(wstr,"已被注冊(cè)的域名") <> 0 Then '判斷是否為已經(jīng)注冊(cè)的域名
Response.Write Request.Form("domain")&"."&formaturl(yes(i))&"<br><br><br><br>" '列出已注冊(cè)的域名
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
%>
相關(guān)文章
asp下輕松實(shí)現(xiàn)將上傳圖片到數(shù)據(jù)庫(kù)的代碼
asp下輕松實(shí)現(xiàn)將上傳圖片到數(shù)據(jù)庫(kù)的代碼...2007-11-11再發(fā)幾個(gè)ASP不錯(cuò)的函數(shù)
再發(fā)幾個(gè)ASP不錯(cuò)的函數(shù)...2007-08-08asp+JMAIL實(shí)現(xiàn)發(fā)送郵件
這篇文章主要介紹了asp+JMAIL實(shí)現(xiàn)發(fā)送郵件實(shí)例代碼,感興趣的小伙伴們可以參考一下2015-09-09ASP FSO文件操作函數(shù)代碼(復(fù)制文件、重命名文件、刪除文件、替換字符串)
FSO的意思是FileSystemObject,即文件系統(tǒng)對(duì)象。FSO對(duì)象模型包含在Scripting 類型庫(kù) (Scrrun.Dll)中,它同時(shí)包含了Drive、Folder、File、FileSystemObject和TextStream五個(gè)對(duì)象,用來(lái)操作文件和文件夾十分方便2011-05-05Asp下實(shí)現(xiàn)多表單域無(wú)組件文件上傳的實(shí)例
Asp下實(shí)現(xiàn)多表單域無(wú)組件文件上傳的實(shí)例...2007-11-11ASP中DateAdd函數(shù)中日期相加或相減使用方法
本文將介紹ASP中DateAdd函數(shù)中日期相加或相減使用方法,需要了解的朋友可以參考下2012-12-12asp實(shí)現(xiàn)新評(píng)論自動(dòng)發(fā)短信提示的代碼
前幾天看到有幾個(gè)wordpress都有有新評(píng)論自動(dòng)發(fā)短信提示的功能,我覺(jué)得不錯(cuò),對(duì)于不經(jīng)常在線的管理員特別有幫助,如果有人發(fā)非法信息一下子就知道了,而且發(fā)信息是免費(fèi)的。2009-11-11