How to protect html form from spammers?

Update: The answer was accepted because I recommended KeyCAPTCHA. From my hard-earned painful expereince, KeyCAPTCHA is a scam by professional spammers. I removed my recommendations of KeyCAPTCHA Note that most professional spambots are integrated with sweatshops (1 USD a 1000 solutions) human captcha solvers API. When a spambot cannot pass captcha itself it (spam bot), … Read more

Reliably detecting PhantomJS-based spam bots

I very much share your take on CAPTCHA. I’ll list what I have been able to detect so far, for my own detection script, with similar goals. It’s only partial, as they are many more headless browsers. Fairly safe to use exposed window properties to detect/assume those particular headless browser: window._phantom (or window.callPhantom) //phantomjs window.__phantomas … Read more

How to Prevent SPAM without CAPTCHAs or a Centrally managed system (e.g. akismet)

I basically use one trick on my site to prevent Spam and it works great (at least until spambot programmers will read this post 😉 ). Code is like this: In the script that builds the site which contains the form, I implemented: $_SESSION[‘lastSiteId’] = ‘something Unique’; $_SESSION[‘lastSiteRequest’] = time(); The script that contains the … Read more

What is the general concept behind XSS?

As the answers on how XSS can be malicious are already given, I’ll only answer the following question left unanswered: how can i prevent XSS from happening on my websites ? As to preventing from XSS, you need to HTML-escape any user-controlled input when they’re about to be redisplayed on the page. This includes request … Read more

Better Honeypot Implementation (Form Anti-Spam)

Concept By adding a invisible field to your forms that only spambots can see, you can trick them into revealing that they are spambots and not actual end-users. HTML <input type=”checkbox” name=”contact_me_by_fax_only” value=”1″ style=”display:none !important” tabindex=”-1″ autocomplete=”off”> Here we have a simple checkbox that: Is hidden with CSS. Has an obscure but obviously fake name. … Read more