<% If request("q")<>"" Then %><%=request("q") %> 域名注册资料、注册人查询情况<% End If %> |
<% If request("q")<>"" Then %>
<%
q=replace(replace(request("q"),"http://",""),"/","")
'1、输入url目标网页地址,返回值getHTTPPage是目标网页的html代码
function getHTTPPage(url)
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"gb2312")
set http=nothing
if err.number<>0 then err.Clear
end function
'2、转换乱玛,直接用xmlhttp调用有中文字符的网页得到的将是乱玛,可以通过adodb.stream组件进行转换
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
on error resume next
'If right(replace(replace(request("domains"),"http://",""),"/",""),3)=".cn" Then
Url="http://whois.hichina.com/cgi-bin/whois?domain="&q&""
Html = getHTTPPage(Url)
start=Instr(html,"")
over=Instr(html," ")
body=mid(html,start-1,over-start-70)
'else
'Url="http://whois.hichina.com/cgi-bin/whois?domain="&replace(replace(request("domains"),"http://",""),"/","")&""
'Html = getHTTPPage(Url)
'start=Instr(html,"")
'over=Instr(html," ")
'body=mid(html,start-1,over-start-87)
'国际数据查询
'Url="http://reports.internic.net/cgi/whois?whois_nic="&replace(replace(request("domains"),"http://",""),"/","")&"&type=domain"
'Html = getHTTPPage(Url)
'start=Instr(html,"")
'over=Instr(html," ")
'body=mid(html,start-1,over-start-1)
'end if
%>
<% Else %>在下面输入框中输入您要查询域名,点击查询按钮即可查询该域名的详细信息的数据库(如域名所有人、域名注册商、域名注册日期和过期日期等)
<% End If %>
|
|