wesley123 wrote:Never heard of the hiddenfield trick before, certainly an interesting one. It might work if that field refers to validating your e-mail(typing it a second time) without it actually being necessary. A spambot would fill it in as it needs to verify it's e-mail adress twice.
It's a neat trick, something I came up with a while ago and has pretty much solved my spam-bot issues on the sites I included it on. Of course this doesn't make it an impossibility - if you have someone dedicated enough that is targeting *your* site, it's easy to circumvent. But statistically speaking, spamers are not interested in hacking a single site (unless we are talking about a high traffic site), it's all about reaching the masses by programming a script that can spread its wings by working on as many sites as possible. So the key here is lowest-common-denominator.
BTW; It doesn't have to be an email address field at all, it can be anything. The important thing is, it has to look like a normal inputfield (so no using the type="hidden"), but needs to be turned invisible through a CSS (preferably linked externally) attribut. Why? It's easy to program a bot - the most simple one will require no more than 10 lines of code. However if you start using attributs through externally linked CSS files, the bot would need to interpretate those too, which would mean A LOT of added complexity with no guarantee that it will work.
Other tricks to determine if the user is a bot or a human is by checking if the visitor is using an actual browser to view the page. Using javascript to generate a captcha of some sort (or an inputfield that is a must-field) works here. Bots are scripts and usually don't have have a javascript engine, (so they can't intepretate any js code as a browser will)... they simply look at the underlying HTML code.
The best solution to protect yourself against bots is to start simple and perhaps use a combination of the above. A hidden inputfield will already block most unwanted spam. Adding a javascript to generate some dynamic inputfield at runtime would give another layer.
I don't like captchas, which is why I've been working on solutions that work by exploiting simple bot behaviour.
@Richard,
This forum has become quite slow when submitting posts lately. Has this to do with the external databases the site is checking to see if the ip address is on a black-list for spam-bots?