导读:
显然,Request.ServerVariables(”HTTP_REFERER”)在多数情况下是不能正常工作的,正因为这个原因,在防止下载盗链时我们才能使Request.ServerVariables(”HTTP_REFERER”)。
如一例:
以下是代码片段:
‘下载系统网址列表,不要带上http://
domain=”2ky.cn,61.156.14.223″
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=”http://www.2ky.cn/“>请进入共享世纪页面后再进行下载。</a>”
CloseDatabase
response.end
end if
下载系统网址列表,就是访问你下载页面的域名或IP,比如你的下载页可以用多个网址来访问,可用逗号隔开。
本文转自
http://www.2ky.cn/Html/200772121650-1.Html
显然,Request.ServerVariables(”HTTP_REFERER”)在多数情况下是不能正常工作的,正因为这个原因,在防止下载盗链时我们才能使Request.ServerVariables(”HTTP_REFERER”)。
如一例:
以下是代码片段:
‘下载系统网址列表,不要带上http://
domain=”2ky.cn,61.156.14.223″
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=”http://www.2ky.cn/“>请进入共享世纪页面后再进行下载。</a>”
CloseDatabase
response.end
end if
下载系统网址列表,就是访问你下载页面的域名或IP,比如你的下载页可以用多个网址来访问,可用逗号隔开。
本文转自
http://www.2ky.cn/Html/200772121650-1.Html