用asp檢查一個域名的備案狀態(tài)的例子!- 虛擬主機(jī),虛擬主機(jī)域名注冊-常見問題,虛擬主機(jī),網(wǎng)頁制作,域名注冊,主機(jī),企業(yè)郵局,主頁空間,個人主頁,網(wǎng)絡(luò)實名,主機(jī)托管,網(wǎng)站建設(shè),域名">

国产精品资源在线_成人在线一区二区_日韩av电影观看_国产亚洲一区二区三区在线观看_午夜在线_草逼网首页

  • 購物車  0

    我的購物車

    0 件商品,共計 0
    去購物車結(jié)算
  • 最新公告 
  • 常見問題
  • 有問必答
  • 網(wǎng)站備案

歡迎您來到禾城數(shù)碼,開始互聯(lián)網(wǎng)之旅!

用asp檢查一個域名的備案狀態(tài)的例子!

<%
'程序功能,自動到信產(chǎn)部網(wǎng)站核對一個域名的備案情況,如果備案成功,返回備案編號。

ICPCheckURL=1
Dim DataSet_ICP()

function GetsRoot(ByVal whichDomain)
 whichDomain=Lcase(whichDomain)
 Exts=".bj.cn,.sh.cn,.tj.cn,.cq.cn,.he.cn,.sx.cn,.nm.cn,.ln.cn,.jl.cn,.hl.cn,.js.cn,.zj.cn,.ah.cn,.fj.cn,.jx.cn,.sd.cn,.ha.cn,.hb.cn,.hn.cn,.gd.cn,.gx.cn,.hi.cn,."
Exts=Exts&"sc.cn,.gz.cn,.yn.cn,.xz.cn,.sn.cn,.gs.cn,.qh.cn,.nx.cn,.xj.cn,.tw.cn,.hk.cn,.mo.cn,"
 Exts= Exts & ".ac.cn,.com.cn,.net.cn,.org.cn,.gov.cn,.edu.cn,.com,.net,.org,.biz,.cn,.info,.tv,.cc,.tw,.name,.ws,.in,.hk,.tw,.us,.au,.ac,.ca"
 AllTop=split(Exts,",")
 if len(whichDomain)>3 then
  for z=0 to Ubound(AllTop)
   extLen=len(AllTop(z))
   if right(whichDomain,extLen)=AllTop(z) then
    prefix=left(whichDomain,len(whichDomain)-extLen)
    dotPos=inStrRev(prefix,".")
    if dotPos>0 then
     whichDomain=mid(prefix,dotPos+1) & AllTop(z)
    end if
    exit for
   end if
  next
 end if
 GetsRoot=whichDomain
end function


function getCmd(strM)
 strM=lcase(strM)
 if inStr(strM," ")>0 then
  getCmd=left(strM,inStr(strM," ")-1)
 else
  getCmd=strM
 end if
end function

Function bstr(vIn)

 Dim strReturn,iii,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
 strReturn = ""
 
 For iii = 1 To LenB(vIn)
  ThisCharCode = AscB(MidB(vIn,iii,1))
  If ThisCharCode < &H80 Then
   strReturn = strReturn & Chr(ThisCharCode)
  Else
   NextCharCode = AscB(MidB(vIn,iii+1,1))
   strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
   iii = iii + 1
  End If
 Next
 bstr = strReturn  
End Function

Sub tinyFitler(someMes)
 ReDim Preserve DataSet_ICP(0)
 blDrop=true
 blN=false
 PreChar=""
 PreCmd=""
 blInTd=false
 intTB=0
 intTR=0
 intTD=0
 blInTd=false
 infos=""

 for iii=1 to len(someMes)
  Schar=mid(someMes,iii,1)
  if Schar="<" then
  blDrop=true
  lastCmd=""
  blN=false
  elseif Schar=">" then
  blDrop=false '某個命令完成
  lastCmd=getCmd(lastCmd)
  if blN then
    if lastCmd="a" then
     if blInTd then infos=infos & ","
    end if
    if lastCmd="td" then
     blInTD=false
     DataSet_ICP(intTR)=DataSet_ICP(intTR) & infos & "`"
     infos=""
    end if
  else
    if lastCmd="table" then
     intTB=intTB+1
      if intTB>1 then
       Exit Sub '不用處理余下的表格
      end if
    end if
    if lastCmd="tr" then
     intTR=intTR+1
     intTD=0
     blInTD=false
     ReDim Preserve DataSet_ICP(intTR)
    end if
 
    if lastCmd="td" then
     blInTD=true
     intTD=intTD+1
    end if
    
  end if

  elseif Schar="/" and PreChar="<" then
  blN=true
  else
   if not blDrop then
    if blInTD then infos=infos & Schar
   else
    lastCmd=lastCmd & Schar
   end if
  end if
  PreChar=Schar
 next

end Sub
'程序設(shè)計:西部數(shù)碼(http://www.west263.com )專業(yè)提供虛擬主機(jī)、域名注冊

Function GetICP(ByType,textvalue)
 on error resume next

 if ByType="No" then
  Gtype=8
 else
  Gtype=2
 end if
'---type=6根據(jù)url查詢(URL);type=2,根據(jù)域名查詢(DO),type=8,根據(jù)icp編號來查(No)

 if ByType="URL" then
  Gtype=6
 end if

 Referer="http://www.miibeian.gov.cn/Search/WW_ICP_WhetherRecord_Select.jsp";
 if ICPCheckURL="1" then
  url="http://211.94.161.10/Search/WW_ICP_WhetherRecord_Search.jsp?selectid="; & Gtype & "&textfield=" & textvalue
 elseif ICPCheckURL="2" then
  url="http://www.miibeian.gov.cn/Search/WW_ICP_WhetherRecord_Search.jsp?selectid="; & Gtype & "&textfield=" & textvalue
 end if


Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Post", url, false
   .setRequestHeader "Referer",Referer
.Send
   GetICP =.ResponseBody
   End With
Set Retrieval = Nothing
 GetICP=bstr(GetICP)
End Function


'如果要檢查,必須先LoadICP
Function LoadICP(BYWHICH,GIVE)
 RetCode=GetICP(BYWHICH,GIVE)
 if isNull(RetCode) then
  LoadICP=false
 else
  Call tinyFitler(RetCode)
  LoadICP=true
 end if
end Function

Function GetNo()
 RRsets=Ubound(DataSet_ICP)
 if RRsets=0 then
  GetNo="ERROR"
 end if
 if RRsets=1 then
  GetNo="NONE"
 end if
 if RRsets>1 then
  GetNo=split(DataSet_ICP(2),"`")(3)
 end if 
end Function


ckbind="要檢查的域名.com"
 If LoadICP("DO",ckbind) Then
   IcpNO=GetNo()
   If IcpNo="NONE" Or IcpNo="ERROR" Then
    if LoadICP("URL",ckbind) then
     IcpNO=GetNo() 
    end if
   End If 'GetsRoot


   If IcpNo="NONE" Or IcpNo="ERROR" Then
    if LoadICP("DO",GetsRoot(ckbind)) then
     IcpNO=GetNo() 
    end if
   End If

   If IcpNo="NONE" Or IcpNo="ERROR" Then
    if LoadICP("URL",GetsRoot(ckbind)) then
     IcpNO=GetNo() 
    end if
   End If
  
   if IcpNo="NONE" or IcpNo="ERROR" then
   respnose.write  "該域名還未備案成功!"
   else
   respnose.write  "該域名已經(jīng)備案成功!備案編號是:"&IcpNO
   end if

 End If


%>

<% '程序功能,自動到信產(chǎn)部網(wǎng)站核對一個域名的備案情況,如果備案成功,返回備案編號。 ICPCheckURL=1 Dim DataSet_ICP() function GetsRoot(ByVal whichDomain) whichDomain=Lcase(whichDomain) Exts=".bj.cn,.sh.cn,.tj.cn,.cq.cn,.he.cn,.sx.cn,.nm.cn,.ln.cn,.jl.cn,.hl.cn,.js.cn,.zj.cn,.ah.cn,.fj.cn,.jx.cn,.sd.cn,.ha.cn,.hb.cn,.hn.cn,.gd.cn,.gx.cn,.hi.cn,." Exts=Exts&"sc.cn,.gz.cn,.yn.cn,.xz.cn,.sn.cn,.gs.cn,.qh.cn,.nx.cn,.xj.cn,.tw.cn,.hk.cn,.mo.cn," Exts= Exts & ".ac.cn,.com.cn,.net.cn,.org.cn,.gov.cn,.edu.cn,.com,.net,.org,.biz,.cn,.info,.tv,.cc,.tw,.name,.ws,.in,.hk,.tw,.us,.au,.ac,.ca" AllTop=split(Exts,",") if len(whichDomain)>3 then for z=0 to Ubound(AllTop) extLen=len(AllTop(z)) if right(whichDomain,extLen)=AllTop(z) then prefix=left(whichDomain,len(whichDomain)-extLen) dotPos=inStrRev(prefix,".") if dotPos>0 then whichDomain=mid(prefix,dotPos+1) & AllTop(z) end if exit for end if next end if GetsRoot=whichDomain end function function getCmd(strM) strM=lcase(strM) if inStr(strM," ")>0 then getCmd=left(strM,inStr(strM," ")-1) else getCmd=strM end if end function Function bstr(vIn) Dim strReturn,iii,ThisCharCode,innerCode,Hight8,Low8,NextCharCode strReturn = "" For iii = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,iii,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,iii+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) iii = iii + 1 End If Next bstr = strReturn End Function Sub tinyFitler(someMes) ReDim Preserve DataSet_ICP(0) blDrop=true blN=false PreChar="" PreCmd="" blInTd=false intTB=0 intTR=0 intTD=0 blInTd=false infos="" for iii=1 to len(someMes) Schar=mid(someMes,iii,1) if Schar="<" then blDrop=true lastCmd="" blN=false elseif Schar=">" then blDrop=false '某個命令完成 lastCmd=getCmd(lastCmd) if blN then if lastCmd="a" then if blInTd then infos=infos & "," end if if lastCmd="td" then blInTD=false DataSet_ICP(intTR)=DataSet_ICP(intTR) & infos & "`" infos="" end if else if lastCmd="table" then intTB=intTB+1 if intTB>1 then Exit Sub '不用處理余下的表格 end if end if if lastCmd="tr" then intTR=intTR+1 intTD=0 blInTD=false ReDim Preserve DataSet_ICP(intTR) end if if lastCmd="td" then blInTD=true intTD=intTD+1 end if end if elseif Schar="/" and PreChar="<" then blN=true else if not blDrop then if blInTD then infos=infos & Schar else lastCmd=lastCmd & Schar end if end if PreChar=Schar next end Sub '程序設(shè)計:西部數(shù)碼(http://www.west263.com )專業(yè)提供虛擬主機(jī)、域名注冊 Function GetICP(ByType,textValue) on error resume next if ByType="No" then Gtype=8 else Gtype=2 end if '---type=6根據(jù)url查詢(URL);type=2,根據(jù)域名查詢(DO),type=8,根據(jù)icp編號來查(No) if ByType="URL" then Gtype=6 end if Referer="http://www.miibeian.gov.cn/Search/WW_ICP_WhetherRecord_Select.jsp" if ICPCheckURL="1" then url="http://211.94.161.10/Search/WW_ICP_WhetherRecord_Search.jsp?selectid=" & Gtype & "&textfield=" & textValue elseif ICPCheckURL="2" then url="http://www.miibeian.gov.cn/Search/WW_ICP_WhetherRecord_Search.jsp?selectid=" & Gtype & "&textfield=" & textValue end if Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP") With Retrieval .Open "Post", url, false .setRequestHeader "Referer",Referer .Send GetICP =.ResponseBody End With Set Retrieval = Nothing GetICP=bstr(GetICP) End Function '如果要檢查,必須先LoadICP Function LoadICP(BYWHICH,GIVE) RetCode=GetICP(BYWHICH,GIVE) if isNull(RetCode) then LoadICP=false else Call tinyFitler(RetCode) LoadICP=true end if end Function Function GetNo() RRsets=Ubound(DataSet_ICP) if RRsets=0 then GetNo="ERROR" end if if RRsets=1 then GetNo="NONE" end if if RRsets>1 then GetNo=split(DataSet_ICP(2),"`")(3) end if end Function ckbind="要檢查的域名.com" If LoadICP("DO",ckbind) Then IcpNO=GetNo() If IcpNo="NONE" Or IcpNo="ERROR" Then if LoadICP("URL",ckbind) then IcpNO=GetNo() end if End If 'GetsRoot If IcpNo="NONE" Or IcpNo="ERROR" Then if LoadICP("DO",GetsRoot(ckbind)) then IcpNO=GetNo() end if End If If IcpNo="NONE" Or IcpNo="ERROR" Then if LoadICP("URL",GetsRoot(ckbind)) then IcpNO=GetNo() end if End If if IcpNo="NONE" or IcpNo="ERROR" then respnose.write "該域名還未備案成功!" else respnose.write "該域名已經(jīng)備案成功!備案編號是:"&IcpNO end if End If %>

來源:
閱讀:8250
日期:2006/12/12

  >> 相關(guān)文章
 
Top

客服熱線

0573-80897175

主站蜘蛛池模板: 91国产在线视频在线 | 精品国产乱码久久久久久88av | 黄色av网站免费看 | 欧美国产日韩在线观看 | 午夜av电影院 | 久久久999精品 | 精品国产一区二区三区久久久四川 | 欧美精品在线观看 | 91精品国产综合久久精品 | 欧美一级黄色片在线观看 | 久久精品com| 午夜视频在线 | 久久精品视频在线观看 | 亚洲一区二区电影在线观看 | 欧美日本一区 | 久久精品视频免费观看 | 在线亚洲免费视频 | 红桃视频一区二区三区免费 | 国产精品美女视频 | 亚洲国产精品视频 | 成人自拍视频网站 | 成人福利网站 | 正在播放国产精品 | 亚洲日韩第一页 | 国产精品久久久久久久7777 | 99免费视频 | 免费精品国产 | 欧美一区二区黄 | 最近中文字幕在线视频1 | 国产精品美女久久久久aⅴ国产馆 | 91视频大全 | 久久久国产一区二区三区 | 人妖av| 米奇7777狠狠狠狠视频 | 亚洲精久久久 | 亚洲 欧美 日韩在线 | 欧美成人a| 亚洲成人一区 | 日韩三区| 欧美 日韩 视频 | 久久精品 |