如何阻止别人非法链接你网站的图片
类别: ASP教程
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)
<% 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)
- 上一篇: 怎样获知数据库的连接属性
- 下一篇: 如何检测用户第一次访问我的网站并显示友好信息
-= 资 源 教 程 =-
文 章 搜 索