当前位置: 移动技术网 > IT编程>开发语言>.net > 使用XMLHTTP制作域名查询系统

使用XMLHTTP制作域名查询系统

2018年10月09日  | 移动技术网IT编程  | 我要评论

重庆极地海洋世界,栗小兵,小学音乐教师工作总结

<%
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.xml(标准化越来越近了)http")
        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="https://panda.www.net.cn/cgi-bin/whois.cgi?domain="&request("domain")&"&"&request("root")&"=yes&work=whois&referer=https://panda.www.net.cn/cgi-bin/check.cgi?domain="&request("domain")
url="https://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
%>

<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>

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网