如何调用显示某网站的alexa排名

来源:百度知道 编辑:UC知道 时间:2024/04/28 21:01:03
<%
Private Function bytes2BSTR(vIn)
Dim i, ThischrCode, NextchrCode
strReturn = ""
For i = 1 To LenB(vIn)
ThischrCode = AscB(MidB(vIn, i, 1))
If ThischrCode < &H80 Then
strReturn = strReturn & Chr(ThischrCode)
Else
NextchrCode = AscB(MidB(vIn, i + 1, 1))
strReturn = strReturn & Chr(CLng(ThischrCode) * &H100 + CInt(NextchrCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
End Function
Function GetURL(url)
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False, "", ""
.Send
GetURL = .ResponseText
GetURL = bytes2BSTR(.Responsebody)
End With
Set Retrieval = Nothing
End Function

'以上是使用xmlhttp读取页面代码的通用代码

Function GetAlexaRank(url)
on error resume next
Dim tempstr,trueurl,x,keystr

trueurl = "