A
A
Anton2017-12-26 00:06:04
css
Anton, 2017-12-26 00:06:04

How to make anti-spam based on the invisible checkbox "I'm a robot"?

<form name="add_my_ankete" action="/ok.php" method="POST" enctype="multipart/form-data">
<label><input type="text" name="line1"  required="required" class="input-small" maxlength="255"  placeholder="Ваше имя" value=""></label>
<label><input type="text" maxlength="20" name="line2"  required="required" class="input-small" maxlength="255"  placeholder="Ваши контакты" value=""></label>
<label><textarea name="line7"    placeholder="Ваш вопрос или отзыв"  class="input-tt" value=""></textarea></label>
<label><input type="hidden" name="line8" class="input-small" maxlength="255" value="<? echo $arResult['ID'];?>" placeholder="<? echo $arResult['ID'];?>
" value=""></label>
<input id="submit" name="submit" type="submit" value="отправить">
</form>

Somewhere there was an implementation, but I forgot ...
We need to make a hidden checkbox. The robot will check the box, but the form will not be submitted. The person will not check the box, because it is not required and besides, the checkbox is hidden - the form will be sent.
How to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
oh, 2017-12-26
well @AnneSmith

hidden in the checkbox is pointless, because the robot will read
it, but css will also not help much here, because robots are most likely already able to determine the visibility property of an element on the page,
try hiding it with css, but the chances, it seems to me, are very small or very short-lived

D
devalone, 2017-12-26
@devalone

These crutches will not save you from a bot on selenium and will not even save you from a bot that stupidly sends the same request, this can be written in 5 minutes on the head.

R
Rou1997, 2017-12-26
@Rou1997

The robot will check the box, but the form will not be submitted.

And why should he put it?
If you only do this:
- set true in html
- write below <script>, which will make false
- and the correct answer will be false
- and the robot does not have JS and therefore it will leave true, send and break off
- you can do this chip only for those who spam, to suddenly create unnecessary problems
- but if they need this bot, they will quickly finalize it
Better really recaptcha v2.
Even just a tick of this captcha is not a simple thing at all - there are a lot of AJAX requests made there, they are complex and go and repeat them all. And most importantly, pictures will start to come out if you do it often or use a proxy.
There are services that are quite simple, but they work slowly, up to 30 seconds for 1 pc. comes.
It's expensive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question