Optimization from spam without captcha

this does not mean discussion, but if it helps against the crawler or spam bots.

Captchas are not friendly and don't look pretty ... that is why I thought about trying something like this:

<form><input type="text" name="name"> <input type="hidden" value="" name="surname" /></form> 

and check if the input type is hidden (to check its bot) (submit.php).

 if (!empty($_POST['surname'])){ $error2 = "You are a Bot."; } 

My question is:

Will this work, or will the crawler or bot ignore input types that are hidden?

Or would it be better to wrap around it <div style="display:none;"></div> ?

Technically it works (if I fill this field with a value) ... but I don’t know if something like this will pretend that I get annoying spam.

Thanks for reading / other solutions that would be userfriendliy.

+6
source share
3 answers

These fields are called honeypot fields , and the idea is to hide them with css, rather than using a hidden field.

This is your decision if you want to use them, and you will need to do some research. There is some criticism of their use, an example of which is the fact that screen readers used to ensure accessibility can see these fields and read them.

You can also check this option, which uses a simple checkbox: http://uxmovement.com/forms/captchas-vs-spambots-why-the-checkbox-captcha-wins/

Note. I think that you should add captcha only if you are sure that you will have spam, or you already have this problem, and not from the very beginning, not knowing if you really need it.

+4
source

Perhaps you can try to process the bot question only on the PHP side, check this, this can help how to identify search bots with php?

+2
source

Adding an empty field hidden in CSS and checking input is one of the options.

Try checking the strange browser information $_SERVER['HTTP_USER_AGENT'] .

Allow minimal open fields, rely on switches, dropdown selectors, validation fields ...

Do not allow sending HTML / URLs ....

The problem is that spammers adapt, you have to adapt too.

+1
source

Source: https://habr.com/ru/post/946246/


All Articles