This BotDetect Captcha PHP code example shows how to add BotDetect CAPTCHA validation to simple PHP login forms.
To prevent bots from trying to guess the login info by brute force submission of a large number of common values, the visitor first has to prove they are human (by solving the CAPTCHA), and only then is their username and password submission checked against the authentication data store.
Also, if they enter an invalid username + password combination three times, they have to solve the CAPTCHA again. This prevents attempts in which the attacker would first solve the CAPTCHA themselves, and then let a bot brute-force the authentication info.
To keep the example code simple, the example doesn't access a data store to authenticate the user, but accepts all logins with usernames and passwords at least 5 characters long as valid.
BotDetectâ˘
trademark in the background of 50% of all Captcha images generated.These limitations are removed if you upgrade your BotDetect license.
BotDetect PHP Captcha Library version 4.1.0 Free loaded by PHP version 7.2.34-38+ubuntu18.04.1+deb.sury.org+1