用Asp实现防盗链

引用时就用:urlcheck就可以了。。 
sub urlcheck 
if min(request.ServerVariables("HTTP_REFERER"),len(" http://"),len(request.ServerVariables("SERVER_NAME")))<>request.ServerVariables("SERVER_NAME") or request.ServerVariables("HTTP_REFERER")="" then 
response.Clear 
response.write("<script language=""javascript"">alert(""WARNING!\nURL WRONG!"");history.back();</script>") 
response.End 
end if 
end sub


nike shoes

你可能感兴趣的:(职场,休闲)