PHP code example of namdongvando / phpcaptcha
1. Go to this page and download the library: Download namdongvando/phpcaptcha 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/ */
namdongvando / phpcaptcha example snippets
session_start();
ptcha;
$lenght = $_GET["l"] ?? 6;
captcha::CreateImg($lenght);
on_start();
use PHPcaptcha\Captcha;
if (isset($_POST["btn"])) {
if ($_POST["captcha"] == Captcha::getValue()) {
var_dump($_POST["captcha"]);
var_dump(Captcha::getValue());
echo "ok";
}
}