asp禁止外部服务器提交表单到服务器
禁止站外提交表单的asp代码如下:
<%
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.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style="font:9pt Verdana" mce_style="font:9pt Verdana">" response.write "你提交的路径有误,禁止从站点外部提交数据请不要乱改参数!"
response.write "</td></tr></table></center>"
response.end
end if
%>
使用方法:
1. 将以上代码另存为checkpath.asp
2. 在遇到表单提交的页面引用此检测代码
<!--#include file="checkpath.asp"-->
相关文档:
'creat by qqlxinye@tom.com
'time 2008-09-19
'qq:273453129
'web www.qqlxinye.cn
dim outSmtp,outUser,outPsd,recUser,recSubmit,bodyContent,AddAttachment,ifsend
function init_mail(str1,str2,str3,str4,str5,str6,str7)
outSmtp=str1
outUser=str2
outPsd=str3
recUser=str ......
原版
upload_5xsoft.inc 文件内容
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
dim Data_5xsoft
Class upload_5xsoft
dim objForm,objFile,Version
Public function Form(strForm)
strForm=lcase(strForm)
if not ......
1.通过ODBC或者OLE方式连接的区别?
现在有两种连接数据库的方法。一方面,可以用ODBC产生一个连接,这种连接与任何有ODBC驱动器的数据库(即基本上是市场上所有的数据库)兼容;另一方面,可以用原始OLE DB提供商产生一个连接。
该用哪个提供商?尽可能用原始OLE DB提供商,因为它提供了对数据更有效的访 ......
<% '---调用WebService 获取Exchange2007已知用户的邮件未读数
'---参数说明----
'url:webservice 的路径
'params:方法参数
'method:方法名称
'dataType:返回的数据类型
function webServices(url,params,method,dataType)
set objXML=Server.CreateObject("MSXML2.XMLHTTP")
objXML.open "post& ......