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

编程学习 2021-07-05 11:26www.dzhlxh.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.net" then

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

Else

FilePath = "/images/chunfeng.jpg"

End If

Response.Redirect(FilePath)

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板