好源码站-站长学院 - 首页

| 网络编程 | 数据库类 | 网页设计 | 服务器类 | 网站推广 |

搜索:

收藏本站|| 广告服务 |

您的位置:好源码站-站长学院-> 网络编程-> ASP教程-> 一段ASP防采集的代码

ASP教程

ASP教程
PHP教程
.Net教程
JSP教程
XML教程
CGI教程

本类阅读TOP10

·动网论坛超级安装指南,新新人类请进来看看
·ASP应用之模板采用
·如何使用ASP建立虚拟的FTP服务器
·使用ASP+jmail进行邮件群发
·用ASP程序组建基于WWW的聊天室
·利用ASP打造个性化论坛(上)
·asp学习注意
·一个asp和javascript传参数的列子
·ASP错误代码
·ASP教程:第十九篇 最新的ASP、IIS安全漏洞

广告
一段ASP防采集的代码

作者:未知 来源:未知 加入时间:2007-6-7 www.haocodes.com

<%
        '作用:文字防复制乱码 函数
        '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
%>



相关文章


关于本站服务条款广告服务客服中心发布文章

客服QQ:6508128
好源码站-版权所有 ICP备05000822号 www.haocodes.com