首页 > 学院 > 编程设计 > 正文

如何阻止别人非法链接你网站的图片?

2020-06-19 13:41:07
字体:
来源:转载
供稿:网友

getimage.asp

<% Option Explicit

Dim strBuffer, FilePath
strBuffer = Request.ServerVariables("HTTP_REFERER")
strBuffer = mid(strBuffer, InStr(strBuffer,".") + 1)
strBuffer = left(strBuffer, InStr(strBuffer, "/") - 1)

FilePath = "/HIDDENIMAGES/"

If strBuffer = "intels.net" then

FilePath = FilePath + Request.QueryString("FName")

Else

FilePath = "/images/chunfeng.jpg"

End If

Response.Redirect(FilePath)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表