• 百度风云榜前50名小偷代码


    百度风云榜前50名小偷小偷自动偷取百度搜索风云榜上每日更新的TOP50关键词。 ——将此代码内嵌你的网站首页(不会占用你的首页显示空间,但是可以被搜索机器人看见),这样你的网站被搜索点击的机会上百倍的增加!!! ——专门用于提高你网站的流量!
    <!--搜索代码开始-->
    <%
    dim url,page,rr,i,cutpage,str
    'on error resume next
            Function getHTTPPage(url)
            '        on error resume next
                    dim http
                    set http=Server.createobject("Microsoft.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
                   
            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
    '===================================================
    url="http://top.baidu.com/top_keyword.html"
    page= getHTTPPage(url)
    cutpage=split(page,"<td width="&chr(34)&"124"&chr(34)&">")
    str=""
    for i=1 to ubound(cutpage)
    rr=instr(cutpage(i),"</td>")
    str=str&mid(cutpage(i),1,rr-1)&" "
    next
    str=replace(replace(str,"<div align="&chr(34)&"center"&chr(34)&">",""),"</div>","")
    response.Write("<marquee direction='up' height='1' width='1' id='xp' scrollamount='1' scrolldelay='100' width='100%' align='center' border='0'><b>"&str&"</b></marquee>")
    %>

    <!--搜索代码结束-->
     
    我改了一下
    <%
    dim url,page,i,str
    'on error resume next
            Function getHTTPPage(url)
            '        on error resume next
                    dim http
                    set http=Server.createobject("Microsoft.XMLHTTP")
                    Http.open "GET",url,False
                    Http.SetRequestHeader "Referer",url
                    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
                   
            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
    '===================================================
    url="http://top.baidu.com/top_keyword.html"
    page= getHTTPPage(url)
    Dim Re
    Set Re=new Regexp
            Re.Multiline=True
            Re.Global=True
            Re.IgnoreCase=True
            Re.pattern="p12blue""\>(([^\<])+?)\<\/"
            Set Matches=Re.Execute(page)
            For Each N In Matches
                    Str=str&","&N.value
            Next
            Str=Replace(str,"p12blue"">","")
            str=Replace(str,"</","")
    response.Write("<marquee direction='up' height='1' width='1' id='xp' scrollamount='1' scrolldelay='100' width='100%' align='center' border='0'><b>"&str&"</b></marquee>")
    %>

  • 相关阅读:
    less的使用
    04 LeetCode --- 反转整数
    03 LeetCode --- 反转整数
    数据结构--- 队列
    数据结构---栈
    数据结构---列表与数组
    04-配置阿里云yum源并启动nginx服务
    03-linux命令
    02-windows下vmware配置nat网络
    01-xshell连接linux
  • 原文地址:https://www.cnblogs.com/chengulv/p/468513.html
Copyright © 2020-2023  润新知