HomePHP Page 3 - Improve PHP Captcha with Optical Character Recognition Tests
Increasing captcha difficulty - PHP
If you're working on a captcha system for your PHP-based website, you may be faced with an interesting challenge. How do you make your system too hard for spam bots to read, but not too hard for humans? This is especially worrying in the wake of bots that can harness OCR for reading captchas. This article explains how to increase the difficulty of a captcha system and test it to make sure it meets your requirements.
To make the captcha five times as difficult, you will need to set the value of $c < 40 to around $c < 40*5 or $c < 200 so the FOR loop condition will now look like this:
Below is the evaluation result of this captcha against strong OCR:
Ten samples were evaluated, and there wasn't a single accurate detection by the OCR.
This means the increasing the background noise to five times the original level increases the difficulty of the captcha level to the point that it could not be accurately detected by the optical character recognition engine.