English
 电子信箱
 加入收藏

  威盾防火墙 >> 新闻中心 >> 威盾新闻 >> ASP下载系统防盗链方法

 

ASP下载系统防盗链方法

威盾防火墙 2014-11-26

 
以动感下载系统为例:

   打开文件 SoftDown.Asp 在:

     if request.QueryString("ID")="" then

     response.write "不能连接或者没有指定下载软件"

     response.end

     end if

     的上面或者是下面加上下列代码

   dim strReferer,domain,splDomain,isHtt

     isHttp=false

   '本站下载系统网址列表,不要带上http://

     domain="sron.net,61.156.14.223,61.156.14.227"

   splDomain=split(domain,",")

     strReferer=Request.ServerVariables("HTTP_REFERER")

     for iii = 0 to ubound(splDomain)

     if instr(strReferer,trim(splDomain(iii)))>0 then isHttp=True

     next

     if isnull(strReferer) or isHttp=false then

     Response.Write "下载链接来自其他网站,这是不允许的,<a href=""./"">请进入本站页面后再进行下载。</a>"

     CloseDatabase

     response.end

     end if

   本站下载系统网址列表 就是访问你下载频道网址里的域名,比如你的下载频道可以用多个网址来访问,所以这里用逗号隔开


相关内容: 最新内容:
网站防盗链专家[2014-11-26]
解读SiteFactory图片防盗链[2014-11-26]
网站图片、文件的防盗链是怎样实现的[2014-11-26]
用防盗链系统修复IIS6.0解析漏洞的技巧[2014-11-26]
IIS7.5配置防盗链[2014-11-26]
IIS7集成模式~对图像服务器进行防盗链设计[2014-11-25]
网站防盗链专家[2014-11-26]
解读SiteFactory图片防盗链[2014-11-26]
网站图片、文件的防盗链是怎样实现的[2014-11-26]
浅谈电子商务中的安全防范技术[2014-11-26]
网站浏览安全细细谈[2014-11-26]
SQLSERVER注入必殺技[2014-11-26]