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

网络编程 2021-07-05 11:26www.168986.cn编程入门

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." then

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

Else

FilePath = "/images/chunfeng.jpg"

End If

Response.Redirect(FilePath)

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by