PS... I've added MySQL support for CF_BHCaptcha.
http://acoderslife.com/downloads/bhcaptcha/

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 06, 2005 12:03 PM
To: CF-Talk
Subject: RE: Spammers getting at my forms and submitting

Okay...

I looked over the emails that my client has gotten and picked out a few key
phrases that would never appear in a normal contact form and dropped them
into a variable. Then I loop over both the form field and the badterms list
and if I find anything then I cancel the processing. Might be a little
overkill, but this way I check all the fields. Here's the code if anyone
wants it:

<!--- list of no-no terms --->
<cfset VARIABLES.valid = 1>
<cfset VARIABLES.badterms =
"MIME-Version,Content-Type,bcc:,Content-Transfer-Encoding,text/plain">

<!--- loop over form fields and see if there's any crap in them --->
<cfloop index="field" list="#FORM.fieldnames#">
        <!--- loop over bad terms on this form field --->
        <cfloop index="term" list="#VARIABLES.badterms#">
                <!--- if there's crap in the form field then cancel the loop
and break
out --->
                <cfif FindNoCase(term,Evaluate("FORM."&field))>
                        <cfset VARIABLES.valid = 0>
                        <cfbreak>
                </cfif>
        </cfloop>
        <!--- if there's crap in the form field then cancel the loop and
break
out --->
        <cfif NOT VARIABLES.valid>
                <cfbreak>
        </cfif>
</cfloop>

<cfif VARIABLES.valid>
        process form here
</cfif>



<!----------------//------
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--------------//--------->




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226221
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to