域名WHOIS查询
2004-12-04 16:46
411 查看
<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="www.haovip.comhttp://www.haovip.com"><strong>www.haovip.com</strong></a>
提供,使用请保持本站链接,谢谢</div>
</table>
</body>
</html>
<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="www.haovip.comhttp://www.haovip.com"><strong>www.haovip.com</strong></a>
提供,使用请保持本站链接,谢谢</div>
</table>
</body>
</html>
相关文章推荐
- 一个颇好玩的东西
- Xmanager 1.3.9远程登录linux
- 利用动态SQL解决排序问题
- windows 2003 安装sql server2000 出错
- Java开发者必去的20个英文技术网站
- [[我认识个家伙,说了注册表这个词,三天之后就被车撞了]] ,哈哈哈哈
- C#.NET 中的类型转换[收藏]
- JAVA初学者的6个问题
- 读书心得:近代中国为什么落伍了?
- 自己写的线控件,可以上方显示标题。
- 使用NUnit测试包含应用程序配置的dll文件
- 比较酷的网站
- 中兴的一道面试题
- GARFIELD@12-04-2004
- 建立三层结构的ASP应用程序
- 悼念陈省身先生
- 第一篇(序)
- [原创] JavaScript面向对象编程(1) :继承
- 夜莺
- JAVA事件小结(转载自loveUnix论坛)