栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > 其他 > xml语言

如何使用XMLHTTP制作域名查询系统的代码案例

xml语言 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何使用XMLHTTP制作域名查询系统的代码案例

如何使用XMLHTTP制作域名查询系统的代码案例

<%On Error Resume NextServer.scriptTimeOut=9999999Function 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 = NothingEnd 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 = nothingEnd Function%><%if request("domain")<>"" then'url=" 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   body="域名已经被注册"  elseif instr(lcase(wstr),"未被注册的域名")>0 then  body="域名未被注册"  else   body="网络延迟,请重新查找"  end if                                  end if%>                 
域名查询系统:<% if request("domain")>"" then response.Write(request("domain")&"."&request("root")&body) end if%>
                                               
www.                         
              
      
  

 

      
    
                         
   

代码我已经在本地测试过了。正常通过。

以上就是如何使用XMLHTTP制作域名查询系统的代码案例的详细内容,更多请关注考高分网其它相关文章!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/794516.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号