PHP - How can I do my own human check?

I would like to make my own php script to test a person. Like a simple series of numbers / letters (captcha), nothing special.

Sentence? Tips? What do you need to keep in mind?

+4
source share
4 answers

this issue is widely covered by a simple google search.

you can use this sample tutorial for reference:

+3
source

You can use the captcha function, such as recaptcha, to test a person.

Or create your own using an image library, and save the answers in a database and give the image file names something that cannot be traced to a word, you may need to make the words fuzzy, since the bot can use ocr.

Another new approach I've seen is someone using ascii art captcha as a reference like this

http://www.network-science.de/ascii/

+4
source

I keep a list of questions and the related side of the answer server. When creating HTML for a question form, I add a randomly selected question to the form and save the index of the question (from the list of questions) in a user session. Then, when the response is sent, I can simply check the response with the index from the session.

It is worth considering that:

  • questions should be easy, should be
  • unambiguous and has only one
  • Possible answer The user can enter an answer in any case.

It's also worth having "why are we asking about this?" a bit in shape, as some users may be a little confused as to why the question exists.

+2
source

You can use the GD library for this. An example of how this can be done here: http://www.php-help.ro/php-tutorials/simple-php-gd-capcha-image/

0
source

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


All Articles