国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

asp下多個域名后綴同時查詢的域名查詢系統

2020-07-27 13:13:06
字體:
來源:轉載
供稿:網友
寫的很簡單,只是實現了功能

<%
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
%>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 闽侯县| 平原县| 河北区| 佛山市| 三穗县| 普格县| 鸡西市| 霍林郭勒市| 广饶县| 龙门县| 桂平市| 红桥区| 巴林左旗| 鹰潭市| 乌拉特后旗| 沈阳市| 凌海市| 磐安县| 施秉县| 桃园县| 通渭县| 巢湖市| 邢台市| 德钦县| 宣城市| 古田县| 托克托县| 隆回县| 沙河市| 平安县| 河东区| 祁连县| 康马县| 桐柏县| 绿春县| 施秉县| 临清市| 遂川县| 天水市| 盘山县| 泰兴市|