域名WHOIS查询

来源:互联网 发布:淘宝买家秀活动说明 编辑:程序博客网 时间:2024/04/28 14:49

<HTML><HEAD><TITLE>域名WHOIS查询</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META
content=WHOIS查询,域名查询,域名所有人查询
name=description>
<META
content=WHOIS查询,域名查询,域名所有人查询 name=keywords>
<LINK href="css.css" type=text/css rel=stylesheet>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="770" border="0" align="center" cellpadding="1" cellspacing="1">
  <tr>
    <td height="19"> <form name="form1" method="get" action="whois.asp">
        <div align="center">请输入要查询的域名  www.
          <input name="domain" type="text" id="domain" size="14">
            
          <input type="submit" name="Submit" value="提 交">
        </div>
      </form></td>
  </tr>
  <tr>
    <td width="30%" height="32" bgcolor="#FFFFFF"> <div align="left">
        <%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path)
        t = GetBody(Path)
        getHTTPPage=BytesToBstr(t,"GB2312")
End function
Function bstr(vIn)

 Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
 strReturn = ""
 
 For i = 1 To LenB(vIn)
  ThisCharCode = AscB(MidB(vIn,i,1))
  If ThisCharCode < &H80 Then
   strReturn = strReturn & Chr(ThisCharCode)
  Else
   NextCharCode = AscB(MidB(vIn,i+1,1))
   strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
   i = i + 1
  End If
 Next
 
 bstr = strReturn  
End Function

Function GetURL(url)
    Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
 
          With Retrieval
          .Open "GET", url, false
    .setRequestHeader "Content-Type","application/x-www-form-urlencoded"
          .Send
          GetURL = .ResponseBody
          End With
    Set Retrieval = Nothing
 GetURL=bstr(GetURL)
End Function
%>
        <% domain= Request.QueryString("domain")
if domain<>"" then
  if  right(domain,2)="cn" then
 TakenHTML = GetURL("http://dn.topbiz.cn/cgi-bin/getwhoisinfo?DomainName="&domain)
response.Write(TakenHTML)
 else %>
        <% TakenHTML = GetURL("http://www.samspade.org/t/whois?a="&domain&"&server=auto&_charset_=utf-8")
start = instr(takenHTML,"<pre>")
finish = instr(takenHTML,"</pre>")
takenHTML=mid(takenHTML,start,finish-start)
response.Write(TakenHTML)
%></pre>
        </div></td>
  </tr>
  <% end if
else %>
  请输入您要查询的域名
  <% end if
%></td></tr>
  <tr>
    <td><div align="center">本程序由 <a href="http://www.haovip.com"><strong>www.haovip.com</strong></a>
        提供,使用请保持本站链接,谢谢</div>
</table>
</body>
</html>