<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Windows Perl Scripting Forums &#187; Topic: Battling form spam</title>
<link>http://www.roth.net/forums/</link>
<description>Windows Perl Scripting Forums &#187; Topic: Battling form spam</description>
<language>en</language>
<pubDate>Wed, 22 May 2013 19:04:25 +0000</pubDate>

<item>
<title>rickaltman on "Battling form spam"</title>
<link>http://www.roth.net/forums/topic.php?id=314#post-661</link>
<pubDate>Tue, 16 Nov 2010 23:30:06 +0000</pubDate>
<dc:creator>rickaltman</dc:creator>
<guid isPermaLink="false">661@http://www.roth.net/forums/</guid>
<description>&#60;p&#62;At our website, &#60;a href=&#34;http://www.BetterPresenting.com&#34; rel=&#34;nofollow&#34;&#62;http://www.BetterPresenting.com&#60;/a&#62;, we take book orders and host an annual conference. Our modest submission-form needs are met with your basic garden-variety form.cgi script (www.betterppt.com/form.zip). Meanwhile, we average about four to six form spam intrusions per day, so this is not an emergency, just an annoyance. In my hope to find a solution that uses our existing plumbing, I came up with the following scheme: &#60;/p&#62;
&#60;p&#62;1. Spam bots indiscriminately fill out every field in a form and send it off. &#60;/p&#62;
&#60;p&#62;2. If a field is not visible to a human, he or she would most likely not enter data into it. &#60;/p&#62;
&#60;p&#62;3. I added a CSS rule into our external .css file called hiddenrow. &#60;/p&#62;
&#60;p&#62;4. I applied this rule to the row of the table that holds the field in question. &#60;/p&#62;
&#60;p&#62;(I also included a simple &#34;do not enter data in this field&#34; comment next to the field, in case someone is using an old browser or for whatever reason the CSS rule is not working.) &#60;/p&#62;
&#60;p&#62;5. It should be a simple matter to include a test at the beginning of the send_mail subroutine that checks for contents in the hidden field. If it finds content, the subroutine aborts; if it does not find content, it continues. &#60;/p&#62;
&#60;p&#62;I suspect that this would eliminate 95% of the form spam we now receive. The only problem is that I don't know how to code it! I tried the following: &#60;/p&#62;
&#60;p&#62;--------------------------&#60;/p&#62;
&#60;p&#62;sub send_email {&#60;br /&#62;
if ($Form{'hiddenfield'} eq '') {&#60;br /&#62;
[continue with send_email subroutine]&#60;br /&#62;
}&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;--------------------------&#60;/p&#62;
&#60;p&#62;but it did not work properly. I would be most grateful if some of the expters here could a) test my theory and my logic; and b) if they are sound, help me figure out the proper syntax for this seemingly-simple task. &#60;/p&#62;
&#60;p&#62;Many thanks.&#60;br /&#62;
Rick A.
&#60;/p&#62;</description>
</item>

</channel>
</rss>
