编程10000问

关注公众号 jb51net

关闭
首页 > 网络编程 > 编程10000问 >

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

作者:

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

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)

阅读全文