Currently we are running a competition which proceeds very well. Unfortunately we have all those cheaters back in business who are running scripts which automatically vote f
This is more of a general strategy that can be combined with many of the other methods. Don't let the spammer know if he succeeds.
You can either hide the current results altogether, only show percentages without absolute number of votes or delay the display of the votes.
Also a general strategy. If you have some reason to assume that the vote is by a spammer, count their vote and mark it as invalid and delete the invalid votes at the end.
Use a CAPTCHA. If your Captcha is broken, use a better one.
Limit the number of votes an IP address can cast in a timespan.
If you assume that one user maps one IP address, you can limit the number if votes by that IP address. However this assumption usually only holds true for private households.
Use Email confirmation and only allow one vote per Email. Check your database manually to see if they are using throwaway-emails.
Note that you can add +foo
to your username in an email address. username@example.com
and username+foo@example.com
will both deliver the mail to the same account, so remember that when checking if somebody has already voted.
Randomize the order of choices. This might take a while for them to find out.
One method of vote faking is to capture the http request from a valid browser like Firefox and mimic it with a script, this doesn't work as easy when you use encryption.
If the spammer votes via proxy, you can check for the X-Forwarded-For header.
Try to see if the client loads all the uncached resources. Many spambots don't do this. I never tried this, I just know that this isn't checked usually by voting sites.
An example would be embedding
in your html, with a.gif being some 1x1 pixel image. Then you have to set the http header for the request GET /a.gif
with Cache-Control "no-cache, must-revalidate"
. You can set the http headers in Apache with your .htaccess
file like this. (thanks Jacco)
[Edit 2010-09-22]