Reputation: 47947
I'd like to make my own php script for the human verification . Like an easy series of numbers/letters (captcha), nothing special.
Suggestion? Tips? Things to keep in mind?
Upvotes: 4
Views: 5774
Reputation: 11080
I keep a list of questions and their associated answer server side. When generating the HTML for a form with a question I add the randomly selected question to the form and store the index of the question (from the list of questions) in the user's session. Then, when answer is posted I can simply check the answer with the index from the session.
Worth baring in mind that:
Also worth having a "why are we asking this?" bit on the form as some users may be a bit confused as to why the question is there.
Upvotes: 2
Reputation: 4128
You can use the GD library to accomplish this. An example of how it can be done here: http://www.php-help.ro/php-tutorials/simple-php-gd-capcha-image/
Upvotes: 0
Reputation: 6653
You could use a captcha service such as recaptcha to check for a human.
Or create your own using an image library and storing the answers in a database and giving the names of the image file something that cannot be traced back to the word, you might need to make the words fuzzy as bot can use ocr.
another novel approach i saw was someone using an ascii art captcha like this
http://www.network-science.de/ascii/
Upvotes: 4
Reputation: 1510
this issue is widely covered by a simple google search.
you can use this tutorial example for a reference:
Upvotes: 3