复制代码 代码如下: <% '屏蔽主流的下载工具 Dimxurl,xtool '获取浏览器AGENT xurl=lcase(Request.ServerVariables("HTTP_USER_AGENT")) '定义禁止的AGENT,下面5个包含最新版的快车,旋风和迅雷部分版本,可以自行添加! xtool="mozilla/4.0(compatible;msie5.00;windows98)"&_ "mozilla/4.0(compatible;msie6.0;windows+nt5.0)"&_ "mozilla/4.0(compatible;msie6.0;windowsnt5.1;)"&_ "mozilla/4.0(compatible;msie6.0;windowsnt5.0;.netclr1.1.4322)"&_ "mozilla/4.0(compatible;msie6.0;windowsnt5.0;.netclr3.5.20706)"&_ "mozilla/4.0(compatible;msie6.0;windowsnt5.1;sv1;.netclr1.1.4322;.netclr2.0.50727)" '判断AGENT是否合法 IfInStr(xtool,xurl)>0Then '下载工具直接报404错误 Response.Status="404NotFound" Response.End EndIf '其它的代码在下面 Response.Write"正常浏览内容,你可以用下载工具测试下载该页面看看是否可以下载?" %>
推荐阅读
用asp实现的获取文件夹中文件的个数的代码
复制代码 代码如下:'返回指定文件夹中文件的数目,传入值为被检测文件夹的硬盘绝对路径 function CountFilesNumber(folderspec) Dim objfso,f,fc Set objfso=CreateObject("Scripting.FileSystemObject") Set f=ob>>>详细阅读
本文标题:asp 防盗链代码(彻底屏蔽迅雷,旋风,快车下载站内资源)
地址:http://www.17bianji.com/kaifa2/ASP/31954.html
1/2 1