TastyNutz
Junior Member
USA
251 Posts |
Posted - 04 March 2009 : 17:49:26
|
Find the following code:
%> <!--#INCLUDE FILE="inc_mail.asp" --> <%
Right ABOVE that, add this:
'Spam filter - Define keywords to filter, then Call the subroutine Const KeyWords = "comma,seperated,list,of,words and phrases" SpamCheck strMessage,KeyWords,SPAM 'Spam filter subroutine Sub SpamCheck(Data,Words,SPAM) Dim WordArray, i WordArray = Split (Words,",",-1,1) For i = 0 to UBound(WordArray) If InStr(LCase(Data),LCase(WordArray(i))) Then SPAM = True Exit For End If Next
If Trim(Data) = "" or SPAM Then Response.Redirect "default.asp" End If End Sub
Add keywords you want to filter to the KeyWords constant.
If the message contains a listed keyword, the spammer is redirected to the main forum and the message is not sent. You can change the redirect if you want, such as http://www.fbi.gov
Have fun!
*The badword filter changed some of my keywords to ****. Be sure to change that back.
<edited by="Shaggy" to="remove words that slipped through the filter" /> |
PowerQuad Disability Support Forum |
Edited by - Shaggy on 05 March 2009 04:35:34 |
|
|