防站外提交设定

asp函数

2008-06-11 10:31

Function chkFrom()
'----------------------------防站外提交设定
Dim server_v1,server_v2, server1, server2
chkFrom=False
server1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server2=Cstr(Request.ServerVariables("SERVER_NAME"))
If Mid(server1,8,len(server2))=server2 Then chkFrom=True
End Function
'if not chkFrom then
'Response.write("请不要从站外提交内容!")
'Response.end
'End if