The ASP prevents the spam message code _ Application Skill
Source: Internet
Author: User
<!--#include file= "common/conn.asp"-->
<!--#include file= "common/sub.asp"-->
<%
Server_v1=cstr (Request.ServerVariables ("Http_referer"))
Response.Write (SERVER_V1)
Server_v2=cstr (Request.ServerVariables ("SERVER_NAME"))
If Mid (Server_v1,8,len (SERVER_V2)) <>server_v2 Then
Response.Write "Prohibit external submission of data"
Response.End
End If
If Len (Request.Form ("Frmcontent")) >1000 Then
Response.Write "Enter more than the specified number of characters"
Response.End
End If
If Request.Cookies ("Visitime") <> "" Then
If DateDiff ("s", Request.Cookies ("Visitime"), Now ()) <60 Then
Response.Write "Please do not repeat the comments within 1 minutes"
Response.End
End If
End If
count= "Liuhe color, free movie, Amway, Http,www"
connts = Split (Connt, ",")
For each glword in connts
If InStr (Request.Form ("Frmcontent"), Glword) <>0 Then
Response.Write "This keyword has been filtered"
Response.End
End If
Next
Dim usernam,comments
Dim fieldlist,valuelist
UserName = Request.Form ("UserName")
Comments = Request.Form ("Comments")
NewSID = Request.Form ("NewSID")
If UserName = "" Or Comments = "" Then
Response.Write ("Name or content not filled out")
Response.End ()
End If
FieldList = Array ("UserName", "Comments", "NewSID")
ValueList = Array (username,comments,newsid)
Set objRS = Server.CreateObject ("Adodb.recordset")
Objrs.open "Feedback", objconn,1,2
Objrs.addnew fieldlist,valuelist
Closei ()
Response.Cookies ("Visitime") =now ()
Response. Redirect (SERVER_V1)
%>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service