<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To Prevent Web-form Spam?</title>
	<atom:link href="http://www.savagehost.com/how-to-prevent-web-form-spam.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.savagehost.com/how-to-prevent-web-form-spam.html</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 14 Jul 2010 11:55:28 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shui X</title>
		<link>http://www.savagehost.com/how-to-prevent-web-form-spam.html/comment-page-1#comment-10469</link>
		<dc:creator>Shui X</dc:creator>
		<pubDate>Mon, 19 Oct 2009 16:00:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.savagehost.com/how-to-prevent-web-form-spam.html#comment-10469</guid>
		<description>Checking HTTP_REFERER is an old an unreliable security measure. Sure, it can add a tiny bit of security but it&#039;s very very easy to spoof the referer info, even automatically.
There&#039;s a PHP security expert named Chris Shiflet that has written a lot about this topic. One of his ideas is to generate two related strings, store one in an invisible tag in the form, and the other in a cookie set in the browser. When the data is received, the two values are compared. If there is no cookie (session) info, script dies. If they don&#039;t match, the script dies.
In a nutshell, the one string is psuedo randomly generated off the current time, and the other is a one-way hash (md5) of that string plus a secret component. Like this:
$hash = md5(&#039;secret salt here&#039;.$string);
Chris Shiflet does a better job of explaining it. The technique does require cookies allowed by your visitor, but it is very easy for the &quot;good guys&quot; to use your form while being very tough on preventing &quot;bad guys&quot; from taking advantage.
I&#039;ve adapted this idea a bit for my own use and I limit the time involved for each token/hash pair. In other words, you only have 15 minutes to submit the form. This means that a spammer can&#039;t gather a token/hash pair from my site and use it from now on to send spam through my form.</description>
		<content:encoded><![CDATA[<p>Checking HTTP_REFERER is an old an unreliable security measure. Sure, it can add a tiny bit of security but it&#8217;s very very easy to spoof the referer info, even automatically.<br />
There&#8217;s a PHP security expert named Chris Shiflet that has written a lot about this topic. One of his ideas is to generate two related strings, store one in an invisible tag in the form, and the other in a cookie set in the browser. When the data is received, the two values are compared. If there is no cookie (session) info, script dies. If they don&#8217;t match, the script dies.<br />
In a nutshell, the one string is psuedo randomly generated off the current time, and the other is a one-way hash (md5) of that string plus a secret component. Like this:<br />
$hash = md5(&#8217;secret salt here&#8217;.$string);<br />
Chris Shiflet does a better job of explaining it. The technique does require cookies allowed by your visitor, but it is very easy for the &#8220;good guys&#8221; to use your form while being very tough on preventing &#8220;bad guys&#8221; from taking advantage.<br />
I&#8217;ve adapted this idea a bit for my own use and I limit the time involved for each token/hash pair. In other words, you only have 15 minutes to submit the form. This means that a spammer can&#8217;t gather a token/hash pair from my site and use it from now on to send spam through my form.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Koolkat</title>
		<link>http://www.savagehost.com/how-to-prevent-web-form-spam.html/comment-page-1#comment-10468</link>
		<dc:creator>Koolkat</dc:creator>
		<pubDate>Mon, 19 Oct 2009 14:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.savagehost.com/how-to-prevent-web-form-spam.html#comment-10468</guid>
		<description>Talking of spam, your other answer (which has been reported) was a spam virus download.
Spam is a huge problem on the entire Internet. Since laws were made (and enforced) against sending spam by email, they&#039;ve had to resort to any other method where users are allowed to put content anywhere on a site. That&#039;s why we get so many here on this site, which is designed for user content.
Your relative could get some Captchas on the site. These are those blurry squiggly hard-to-read numbers and letters you have to copy before submitting something. They are a nuisance, and may put off a small number of customers, but they are very hard to read by computer, so at least the automated spam bots can&#039;t get past them to spam you.
Big companies get theirs from a Captcha service. A smaller site could make up some, say 20, as graphics images, and have a script that displays them at random on the contact form. 
The other defense is to put a good spam filter on the incoming mail from the site. 
This one is $30 and has a 20-use free trial.
. http://www.antispamguard.com
This is a listing of many different ones, ranging from free to shareware to commercial oneshttp://3d2f.com/tags/spam/guard
For low volume, probably even one of the free ones would work well. Get the mail directed to a POP account (on Outlook Express, not on Web mail) as that also has better built-in sorting and blocking features. Also it will sort the mail into different groups, if there are different types of queries coming in. All you need do is put a list of choices for the customer to click; this goes into the email subject line, and gets sorted on that basis into the right folder. 
Good luck with this never-ending fight.</description>
		<content:encoded><![CDATA[<p>Talking of spam, your other answer (which has been reported) was a spam virus download.<br />
Spam is a huge problem on the entire Internet. Since laws were made (and enforced) against sending spam by email, they&#8217;ve had to resort to any other method where users are allowed to put content anywhere on a site. That&#8217;s why we get so many here on this site, which is designed for user content.<br />
Your relative could get some Captchas on the site. These are those blurry squiggly hard-to-read numbers and letters you have to copy before submitting something. They are a nuisance, and may put off a small number of customers, but they are very hard to read by computer, so at least the automated spam bots can&#8217;t get past them to spam you.<br />
Big companies get theirs from a Captcha service. A smaller site could make up some, say 20, as graphics images, and have a script that displays them at random on the contact form.<br />
The other defense is to put a good spam filter on the incoming mail from the site.<br />
This one is $30 and has a 20-use free trial.<br />
. <a href="http://www.antispamguard.com" rel="nofollow">http://www.antispamguard.com</a><br />
This is a listing of many different ones, ranging from free to shareware to commercial oneshttp://3d2f.com/tags/spam/guard<br />
For low volume, probably even one of the free ones would work well. Get the mail directed to a POP account (on Outlook Express, not on Web mail) as that also has better built-in sorting and blocking features. Also it will sort the mail into different groups, if there are different types of queries coming in. All you need do is put a list of choices for the customer to click; this goes into the email subject line, and gets sorted on that basis into the right folder.<br />
Good luck with this never-ending fight.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
