PHP code example of yassinedoghri / codeigniter-altcha
1. Go to this page and download the library: Download yassinedoghri/codeigniter-altcha 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/ */
yassinedoghri / codeigniter-altcha example snippets
public $helpers = [/*...other helpers...*/, 'altcha'];
public $globals = [
'before' => [
// ...
'altcha' => [
'except' => ['api*'] // discard paths for which you want to bypass the ALTCHA verification
],
],
// ...
];
<form method="POST" action="/your-endpoint">
<!-- Your form fields go here -->
<?= altcha_widget()
// new file - app/Config/Altcha.php
declare(strict_types=1);
namespace Config;
// ...
use CodeIgniterAltcha\Config\Altcha as CodeIgniterAltcha;
class Altcha extends CodeIgniterAltcha
{
// ...
}