yassinedoghri/codeigniter-altcha

A CodeIgniter4 library for ALTCHA, a GDPR, WCAG 2.2 AA, and EAA compliant, self-hosted CAPTCHA alternative with PoW mechanism.

v1.0.0 2025-09-27 20:21 UTC

This package is auto-updated.

Last update: 2025-09-27 20:25:06 UTC


README

CodeIgniter ALTCHA 🔥🔄🔒

Latest Stable Version Total Downloads License PHP Version Require

A CodeIgniter4 library for altcha, a GDPR, WCAG 2.2 AA, and EAA compliant, self-hosted CAPTCHA alternative with PoW mechanism.

🚀 Getting started

0. Prerequisites

Download or install the ALTCHA widget script and include it on the pages where you want to display the CAPTCHA.

Note

Installing via a package manager?

Check out CodeIgniter Vite 🔥⚡ for a fast and simple way to manage JavaScript and TypeScript packages in your CodeIgniter 4 projects.

1. Installation

  1. Install codeigniter-altcha using composer:

    composer require yassinedoghri/codeigniter-altcha
  2. Add altcha helper to your Autoload.php file:

    public $helpers = [/*...other helpers...*/, 'altcha'];
  3. Render the ALTCHA widget inside your forms using the altcha_widget() helper:

    <form method="POST" action="/your-endpoint">
     <!-- Your form fields go here -->
    
     <?= altcha_widget() ?>
    
     <button type="submit">Submit</button>
    </form>

2. Configure

Copy the Altcha.php config file from vendor/yassinedoghri/codeigniter-altcha/src/Config/ into your project's config folder and update the namespace to Config. You will also need to have these classes extend the original classes.

// new file - app/Config/Altcha.php
<?php

declare(strict_types=1);

namespace Config;

// ...
use CodeIgniterAltcha\Config\Altcha as CodeIgniterAltcha;

class Altcha extends CodeIgniterAltcha
{
    // ...
}

⚙️ Config reference

// TODO

❤️ Acknowledgments

This wouldn't have been possible without the amazing work of the CodeIgniter & altcha-org teams.
Thank you 🙏

📜 License

Code released under the MIT License.

Copyright (c) 2025-present, Yassine Doghri (@yassinedoghri).