BotDetect PHP CAPTCHA Validation:
PHP Login Form CAPTCHA Code Example

CAPTCHA included in PHP Login form validation
Retype the CAPTCHA code from the image
Change the CAPTCHA code

CAPTCHA Code Example Description

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.

Free Version Limitations

  • The free version of BotDetect only includes a limited subset of the available CAPTCHA image styles and CAPTCHA sound styles.
  • The free version of BotDetect includes a randomized BotDetect™ trademark in the background of 50% of all Captcha images generated.
  • It also has limited sound functionality, replacing the CAPTCHA sound with "SOUND DEMO" for randomly selected 50% of all CAPTCHA codes.
  • Lastly, the bottom 10 px of the CAPTCHA image are reserved for a link to the BotDetect website.

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