0

I'm looking at adding a bit of security to a form to avoid spammers and bots.

I know I can add a captcha, but I really don't like these as they look clunky.

I've seen other places that have things such as What is 2 + 2? and What colour is an orange?

Is there a bundle / library / example of implementing a question-based 'captcha'?

Elnur Abdurrakhimov
  • 44,533
  • 10
  • 148
  • 133
sipher_z
  • 1,221
  • 7
  • 25
  • 48
  • 1
    See this question, you would get a lot of options http://stackoverflow.com/questions/8472/practical-non-image-based-captcha-approaches – Engineer Sep 05 '13 at 13:56
  • 1
    Take a look at [Packagist](https://packagist.org/search/?q=captcha) – Brewal Sep 05 '13 at 13:59
  • You can just have a hidden field as the first element in your form. Bots won't know to avoid it, whereas genuine users will not see it - then if the element contains something, ignore the post. – halfer Sep 05 '13 at 14:26

1 Answers1

1

Other way you can do like:

  1. When form is getting open, then generate some long token key
  2. Store this long token key on one table as well.
  3. After submitting the form, check for the token key, if exists, then insert and remove that token key from table as well.
  4. If token key not found on table, then ignore insertion of data.
Shreyas
  • 247
  • 1
  • 14