⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auditsiterank.asp

📁 个性网名转换-繁体字转换-qq强制聊天-qq秀查看-空间留言代码编辑器-等其他常用工具
💻 ASP
字号:
<%
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,"<REACH RANK=""","")
    str=replace(str,"""/>","")
    str=replace(str," ","")
del=str
End Function
dim wd
wd=request("DomainName")
If wd<>"" Then
'截取网址
url="http://data.alexa.com/data/?cli=10&dat=snba&ver=7.0&url="&wd
        wstr=getHTTPPage(url)

'截取数据
set reg=new Regexp
	reg.Multiline=True
	reg.Global=Flase
	reg.IgnoreCase=true
	reg.Pattern="<REACH RANK=((.|\n)*?)>"
	Set matches = reg.execute(wstr)
		For Each match1 in matches
			alexa=del(match1.Value)
		Next
Set matches = Nothing
Set reg = Nothing
'截取网址
url="http://pc.netsoz.com/api/pagerank:"&wd&".xml"
        wstr=getHTTPPage(url)

'截取数据
set reg=new Regexp
	reg.Multiline=True
	reg.Global=Flase
	reg.IgnoreCase=true
	reg.Pattern="<pagerank>((.|\n)*?)</pagerank>"
	Set matches = reg.execute(wstr)
		For Each match1 in matches
			pr=match1.Value
		Next
Set matches = Nothing
Set reg = Nothing
pr=Replace(pr,"<pagerank>","")
pr=Replace(pr,"</pagerank>","")
End If
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -