PHP code example of jublonet / catcha
1. Go to this page and download the library: Download jublonet/catcha 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/ */
jublonet / catcha example snippets
$catcha = new Catcha;
$catcha->outputImage();
$entered_result = -1;
if (isset($_POST['your_field_name'])) {
$entered_result = intval($_POST['your_field_name']);
}
$catcha_solved = $catcha->isCorrectResult($entered_result);
$catcha->setImageSize($desired_width, $desired_height);
$catcha->setImageFont($path_to_font);