• 设为首页
  • 加入收藏
  • 联系我们
  • 首页ASP源码 | php源码 | JSP源码 | CGI源码 | .NET源码 | 建站素材 | 工具软件 | 服务器软件 | 电子书籍下载报错
    文章 │ 业内资讯 | 名将说站 | 搜索优化 | 网站编程 | 网页设计 | 图像动画 | 网络应用 | 电脑顾问 | 数据库 | 服务器
    您当前的位置:广安源码下载文章中心网站编程 → 文章内容 退出登录 用户管理
    本类热门文章
    相关下载
    一段ASP防采集的代码
    作者:佚名  来源:  作者:  发布时间:2008-2-23 13:22:01

    减小字体 增大字体

    <%
            '作用:文字防复制乱码 函数
            'Date:2006-3-6
            '作者:blue2004
            '参数str 为原文,str1作者也是你自己,reslut产生乱码的种子
            Function ReadToCode(str,Str1,result)
                    dim name
                    dim i,j,k
                    If isnull(str) then
                            ReadToCode=""
                            Exit Function
                    End If
                    Randomize
                    k=instr(str,"</P>")
                    Do while k>0
                            result=""
                            for i=0 to 19
                                    j=Int(128 * Rnd)+1
                                    if j=60 or j=62 then
                                            j=j+1
                                    end if
                                    result =result&chr(j) ' 产生随机数。
                            next
                            result="<span style='DISPLAY: none'>"&result&"</span>"
                            str=replace(str,"</p>",result&"<'/p>",1,1)
                            k=instr(str,"</p>")
                    loop
                    str=replace(str,"<'/p>","</p>")

                    k=instr(str,"<br>")
                    Do while k>0
                            result=""
                            for i=0 to 19
                                    j=Int(128 * Rnd)+1
                                    if j=60 or j=62 then
                                            j=j+1
                                    end if
                                    result =result&chr(j) ' 产生随机数。
                            next
                            result="<span style='DISPLAY: none'>"&result&"</span>"
                            str=replace(str,"<br>",result&"<'br>",1,1)
                            k=instr(str,"<br>")
                    loop
                    str=replace(str,"<'br>","<br>")
                    ReadToCode=str&"<div align=right style='color=gray'>[版权归原作者及"&Str1&"共同拥有,转载请注明出处]</div>"
            End Function


    Dim a
    a="嘎嘎,一篇<br>不错的好<p>文章哦</P><br><P>我艹,,让你偷。。木 JJ的家伙,嬲。。</p>"


    'Only For Test
    response.write (a)

    Dim b
    '为配合转换,字符串a的大小都替换成小写
    b=ReadToCode(LCase(a),"blue2004","www.xxx.com")

    'Output
    response.write b
    %>
    [] [返回上一页] [打 印]
    文章评论 (评论内容只代表网友观点,与本站立场无关!)

    用户名: 查看更多评论

    分 值:100分 85分 70分 55分 40分 25分 10分 0分

    内 容:

             (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码

    关于本站 - 网站帮助 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 管理登陆
    版权所有:广安视窗 联系人:王先生 客服QQ:566533
    Copyright © 2003-2007 www.Guang-an.com. All Rights Reserved .