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

<%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
ifmid(server_v1,8,len(server_v2))<>server_v2then
%>
警告!你正在从外部提交数据!!请立即终止!!
<%
Response.Redirect"index.asp"
endif
%><%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
ifmid(server_v1,8,len(server_v2))<>server_v2then
%>
警告!你正在从外部提交数据!!请立即终止!!
<%
Response.Redirect"index.asp"
endif
%> http://www.corange.cn/archives/2008/02/250.html

你可能感兴趣的:(html,asp)