PHP code example of phphleb / ucaptcha
1. Go to this page and download the library: Download phphleb/ucaptcha library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phphleb / ucaptcha example snippets
(new \Phphleb\Ucaptcha\Captcha())->createImage(\Phphleb\Ucaptcha\Captcha::TYPE_BASE);
if ((new \Phphleb\Ucaptcha\Captcha())->check($code)) {
// Characters entered correctly.
} else {
// Invalid characters.
};
if ((new \Phphleb\Ucaptcha\Captcha())->isPassed()) {
// The captcha has already been completed earlier.
}