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

首頁 > 學院 > 開發設計 > 正文

使用XMLHTTP制作域名查詢系統

2019-11-18 19:31:56
字體:
來源:轉載
供稿:網友

<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
        t = GetBody(Path)
  getHTTPPage=BytesToBstr(t,"GB2312")
End function

Function GetBody(url)
        on error resume next
        Set Retrieval = CreateObject("Microsoft.xmlHTTP")
        With Retrieval
        .Open "Get", url, False, "", ""
        .Send
        GetBody = .ResponseBody
        End With
        Set Retrieval = Nothing
End Function

Function BytesToBstr(body,Cset)
        dim objstream
        set objstream = Server.CreateObject("adodb.stream")
        objstream.Type = 1
        objstream.Mode =3
        objstream.Open
        objstream.Write body
        objstream.Position = 0
        objstream.Type = 2
        objstream.Charset = Cset
        BytesToBstr = objstream.ReadText
        objstream.Close
        set objstream = nothing
End Function
%>
<%
if request("domain")<>"" then
'url="wstr=getHTTPPage(url)
'www.survivalescaperooms.com
'response.write Instr (wstr,"可以注冊")  
  if instr(lcase(wstr),"已被注冊的域名")>0 then
     body="域名已經被注冊"
  elseif instr(lcase(wstr),"未被注冊的域名")>0 then
  body="域名未被注冊"
  else
     body="網絡延遲,請重新查找"
  end if                                                                   
end if
%>

<table width="40%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
  <tr>
    <td height="26" bgcolor="efefef">域名查詢系統:<% if request("domain")>"" then response.Write(request("domain")&"."&request("root")&body) end if%></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><form name="form1" method="post" action=""><table width="100%" border="0" cellspacing="1" cellpadding="1">
        <tr>
         
            <td height="36"> <div align="center">www.
                <input type="text" name="domain">
                <select name="root" id="select">
                  <option value="cn" selected>.cn</option>
                  <option value="com">.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="gov.cn">.gov.cn</option>
                </select>
              </div></td>
        
        </tr>
        <tr>
          <td height="35">
<div align="center">
              <input type="submit" name="Submit" value=" 查 詢 ">
            </div>
            <div align="center"></div></td>
        </tr>
      </table></form></td>
  </tr>
</table>

<p align="center">&nbsp;</p>
<table width="40%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#999999">
  <tr>
    <td height="42" bgcolor="#FFFFFF">
<FORM name=search_form action='http://search.sohu.com/web'  method=get target=_blank>
        <div align="center">
          <input type="hidden" name="pid" value="hljec">
          <input name="query" type="text" style="font-size:14px;width:150" value="好域名">
          <input type="submit" name="ss" value="查看"   onclick=document.search_form.action='http://search.sohu.com/web' style="font-size:14px;width=40;height=20">
          &nbsp;</div>
      </FORM></td>
  </tr>
</table>

代碼我已經在本地測試過了。正常通過。
文章里面的用到的Microsoft.
xmlhttp組件。其用法請參見:http://www.survivalescaperooms.com/5190.html


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 土默特左旗| 那坡县| 黄石市| 东乡| 佛山市| 开封县| 曲水县| 塔河县| 改则县| 普陀区| 新和县| 文水县| 康保县| 昌图县| 包头市| 贵德县| 辉县市| 二手房| 甘泉县| 施秉县| 青阳县| 九寨沟县| 濮阳市| 邻水| 马关县| 雷山县| 天等县| 九寨沟县| 富阳市| 垦利县| 蒙阴县| 峡江县| 扎赉特旗| 乾安县| 清涧县| 阿荣旗| 城市| 常宁市| 阜城县| 万盛区| 崇信县|