Good Form Security - no CAPTCHA

后端 未结 9 1728
情歌与酒
情歌与酒 2020-12-08 06:44

Is there a good method of form security that does not involve CAPTCHA? CAPTCHA is so annoying, but I need security because I am getting form spam. My form is

相关标签:
9条回答
  • 2020-12-08 07:41

    Depends on the type of form spam, general bots made for spamming any form it finds can easily be foiled by a lot less obstructive measures (like "what is the name of this site?"), but if someone has made a bot targeting your site specifically you will need captchas or something equally annoying.

    0 讨论(0)
  • 2020-12-08 07:42

    This kind of validator is cute and quick!

    Obviously, you will want to display one of a many possible animal images, and the list should be randomized as well.

    I understand it will only work X% of the time, but adding more options to the list will help reduce spam.

    0 讨论(0)
  • 2020-12-08 07:42

    I have already worked something similar.

    1. When you open a form generate one md5() string and put it in session (for example $_SESSION['captha'])
    2. Your form sould have one hidden field and when you open this form write this data from $_SESSION['captha'] into this hidden field
    3. When you receive this post request compare value in session and value which come with this hidden field. If it is same everithing is ok and vice versa. Of course, after you handle this request just delete variable $_SESSION['captha'].

    This work for me.

    0 讨论(0)
提交回复
热议问题