【www.gdgbn.com--SEO综合】

,Alexa Rank,有利于站长正确认识和优化自己的网站。这个程序网上有很多版本,由于都是小偷程序,致使原网站的改版导致某些查询出错或效率低下、查询速度慢。这个版本是在搜集了网上众多版本后综合整合而成,同时加入了些新的东西,版本及时更新,如有不能使用请至

<%
If request("d")="" Then
Response.Redirect "myalexa.asp?d=lply.com"
End If
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.XMLHTTP")
        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("ado"&"db.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
Function Newstring(wstr,strng)
        Newstring=Instr(lcase(wstr),lcase(strng))
        if Newstring<=0 then Newstring=Len(wstr)
End Function

Function del(str)
    str=replace(str,"     str=replace(str,"""/>","")
    str=replace(str," ","")
del=str
End Function
dim wd
wd=Request("d")
"截取网址
url="http://data.alexa.com/data/?cli=10&dat=snba&ver=7.0&url="&wd
        wstr=getHTTPPage(url)

%>

<%=Request("d")%>的alexa综合排名查询结果







" target=_blank class=alexarank>
<%
"截取数据
set reg=new Regexp
 reg.Multiline=True
 reg.Global=Flase
 reg.IgnoreCase=true
 reg.Pattern=""
 Set matches = reg.execute(wstr)
  For Each match1 in matches
   bodypage=del(match1.Value)
  Next
Set matches = Nothing
Set reg = Nothing
Response.Write bodypage
%>

本文来源:http://www.gdgbn.com/seo/22814/