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

首頁 > 編程 > ASP > 正文

asp實現域名查詢的數據庫接口代碼

2024-05-04 11:07:17
字體:
來源:轉載
供稿:網友

asp實現域名查詢的數據庫接口代碼

<%   
  on   error   resume   next   
  Private   d_exsit   
  Dim   Retrieval   
  Dim   Domain   
  Dim   TakenHTML   
  Function   GetURL(url)   
          Set   Retrieval   =   Server.CreateObject("Microsoft.XMLHTTP")   
                      With   Retrieval   
                      .Open   "GET",   url,   False,   "",   ""   
                      .Send   
                      GetURL   =   .ResponseText   
                      End   With   
          Set   Retrieval   =   Nothing   
  End   Function   
  Domain   =   Replace(Request.Form("domain"),"www.","")   &   "."   &   Request.Form("ext")   
  if   Domain=".com"   or   Request.Form("domain")=""   then   
  Response.Write   ("<script>alert(’看看您什么忘記填寫了?沒有填寫域名吧?’);javascript:history.back(1)</script>")   
  response.end   
  end   if   
  ’TakenHTML   =   GetURL("")   
  TakenHTML   =   GetURL("="   &   Domain)   
  d_exsit=1   
  if   InStr(TakenHTML,"No   entries")   >   1   then   
            
          Response.Write   Domain   &   "出錯了,請返回!<br><br>"   
  else   
          if   InStr(TakenHTML,"No   match")   >   1   then   %>   
  祝 賀您,您想注冊的域名   <%   =Domain   %>   還沒有被注冊<p>< a   href="#"   onClick="MM_openBrWindow(’../formmail/domain.htm’,’’,’scrollbars=auto,width=500,height=500’)">   
  點擊這里,開始注冊您的域名</a></p></font>   
  <%   else   %>   
              <font   color="red"& gt;<br>很抱歉</font>   您想注冊的域名   <%   =Domain   %>   已經被注 冊了!<p></p>請您換個域名再試</font>   
              <form   method="post"   action="search.asp"   name="checkdomain"   id=Form1>   
                     type="text"   name="domain"   id=Text1>   
                  <select   name="ext"   id=Select1>   
                      <option   value="com"   selected>.com</option>   
                      <option   value="net">.net</option>   
                      <option   value="org">.org</option>   
                      <option   value="com.cn">.com.cn</option>   
                      <option   value="net.cn">.net.cn</option>   
                      <option   value="org.cn">.org.cn</option>   
                      <option   value="cc">.cc</option>   
                      <option   value="tv">.tv</option>   
                      <option   value="biz">.biz</option>   
                      <option   value="info">.info</option>   
                  </select>   
                  <input   type="submit"   name="Submit"   value=" 查詢"   id=Submit1   onClick   =   "return   submitchecken();">   
              </form>以下是此域名的詳細注冊信息<BR></font>   
  <table><tr><td><PRE><%   =dowith()   %></PRE></td></tr></table></font>   
  <%   end   if   
  end   if   
  Function   dowith()   
  Dim   lStrURL   
          Dim   pagebefore   
            Dim   pageafter   
            Dim   tempcontent   
            Dim   pagestart   
            Dim   pageend   
            dim   temps   
                pageafter   =   "<PRE>"   
                pagebefore   =   "</PRE>"   
                tempcontent   =   TakenHTML   
            if   d_exsit<>0   then   
                pagestart   =   InStr(1,tempcontent,   pageafter,1)   
                    If   pagestart   =   0   Then   
                        dowith   =   "<font   color=""red"">意外的錯誤2!</font>"   
                          d_exsit   =   3   
                          Exit   Function   
                    Else   
                          pagestart   =   pagestart   +   Len(pageafter)   +   1   
                          pageend   =   InStr(pagestart,   tempcontent,   pagebefore,1)   
                              If   pageend   =   0   Then   
                                  dowith   =   "<font   color=""red"">意外的錯誤!</font>"   
                                  d_exsit   =   3   
                                  Exit   Function   
                            Else   
                                pageend   =   pageend   -   pagestart   ’得到內容長度   
                                tempcontent   =   Mid(tempcontent,   pagestart,   pageend)   
                            End   If   
                    End   If           
              Set   pageregexp   =   New   RegExp   
              pageregexp.Global   =   True   
              pageregexp.Pattern   =   "<[^>]*>"   
              tempcontent   =   pageregexp.Replace(tempcontent,   "")   
              Set   pageregexp   =   Nothing   
              dowith   =   tempcontent   
      End   If   
  End   Function   
  %>  

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 万宁市| 林芝县| 江门市| 那曲县| 班玛县| 博乐市| 洛川县| 万盛区| 南丹县| 临夏县| 青河县| 永嘉县| 固镇县| 平南县| 崇左市| 阿拉尔市| 布尔津县| 三台县| 上虞市| 峡江县| 武山县| 天祝| 邵阳县| 鹤岗市| 溧阳市| 清水县| 开远市| 柯坪县| 靖远县| 凤山市| 大港区| 义乌市| 清涧县| 城市| 玛纳斯县| 平乐县| 通辽市| 班戈县| 绵竹市| 隆昌县| 黄浦区|