• λ我爱Aspx >> C#.Net >> 使用XMLHTTP制作域名查询系统_ASP实例
  • 使用XMLHTTP制作域名查询系统_ASP实例

  • :aspxer  Դ:internet  :2007-4-28 23:39:13  ؼ:asp,xml
  • <%

    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="http://panda.www.net.cn/cgi-bin/Whois.cgi?domain="&request("domain")&"&"&request("root")&"=yes&work=whois&referer=http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&request("domain")

    url="http://panda.www.net.cn/cgi-bin/Check.cgi?domain="&request("domain")&"&ext="&request("root")

    wstr=getHTTPPage(url)

    'www.knowsky.com

    'response.write Instr (wstr,"可以注册")

    if instr(lcase(wstr),"已被注册的域名")>0 then

    Ҷƪл˵?
  • һƪASP函数库_ASP技巧
    һƪDelphi编写组件封装asp代码的基本步骤_ASP实例