ASP实现禁止从外部提交数据

来源:互联网 发布:unitedstack 知乎 编辑:程序博客网 时间:2024/03/28 17:05
<script type="text/javascript"><!--google_ad_client = "pub-4490194096475053";/* 内容页,300x250,第一屏 */google_ad_slot = "3685991503";google_ad_width = 300;google_ad_height = 250;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<% 
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER")) 
server_v2=Cstr(Request.ServerVariables("SERVER_NAME")) 
if mid(server_v1,8,len(server_v2))<>server_v2 then 
%> 
警告!你正在从外部提交数据!!请立即终止!! 
<% 
Response.Redirect "index.asp" 
end if 
%><% 
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER")) 
server_v2=Cstr(Request.ServerVariables("SERVER_NAME")) 
if mid(server_v1,8,len(server_v2))<>server_v2 then 
%> 
警告!你正在从外部提交数据!!请立即终止!! 
<% 
Response.Redirect "index.asp" 
end if 
%> http://www.corange.cn/archives/2008/02/250.html
原创粉丝点击