PHPackages                             yassinedoghri/codeigniter-altcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. yassinedoghri/codeigniter-altcha

ActiveLibrary[Security](/categories/security)

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.1.4(4mo ago)10291MITPHPPHP &gt;=8.2CI passing

Since Sep 27Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/yassinedoghri/codeigniter-altcha)[ Packagist](https://packagist.org/packages/yassinedoghri/codeigniter-altcha)[ RSS](/packages/yassinedoghri-codeigniter-altcha/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (7)Used By (0)

 [![CodeIgniter ALTCHA logo](./src/logo.svg)](./src/logo.svg)CodeIgniter ALTCHA 🔥🔄🔒
======================

[](#codeigniter-altcha-)

[![Latest Stable Version](https://camo.githubusercontent.com/ce8f89f47f949e670fb31dfa4ced1e6bcca527778175eea5ca9e1019f608c174/68747470733a2f2f706f7365722e707567782e6f72672f79617373696e65646f676872692f636f646569676e697465722d616c746368612f76)](https://packagist.org/packages/yassinedoghri/codeigniter-altcha)[![Total Downloads](https://camo.githubusercontent.com/183abe04e33cfeca773213a89607121e6c7f9f896e192a5914a93835f376f8cd/68747470733a2f2f706f7365722e707567782e6f72672f79617373696e65646f676872692f636f646569676e697465722d616c746368612f646f776e6c6f616473)](https://packagist.org/packages/yassinedoghri/codeigniter-altcha)[![License](https://camo.githubusercontent.com/1a972d5a2c2a8c6bbb91190a51f683ba5c38864954b283b40ce3b28af2a1f76a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f79617373696e65646f676872692f636f646569676e697465722d616c746368613f636f6c6f723d677265656e)](https://packagist.org/packages/yassinedoghri/codeigniter-altcha)[![PHP Version Require](https://camo.githubusercontent.com/443980f4c8ec335594331069ba75fb0800a6fbbd20d0875799914d6152ff3c01/68747470733a2f2f706f7365722e707567782e6f72672f79617373696e65646f676872692f636f646569676e697465722d616c746368612f726571756972652f706870)](https://packagist.org/packages/yassinedoghri/codeigniter-altcha)

A [CodeIgniter4](https://codeigniter.com/) library for [ALTCHA](https://altcha.org/), a GDPR, WCAG 2.2 AA, and EAA compliant, self-hosted CAPTCHA alternative with [Proof‑of‑Work (PoW)](https://en.wikipedia.org/wiki/Proof_of_work) mechanism.

Why ALTCHA?
------------

[](#why-altcha-)

- **No frustrating puzzles**. Proof‑of‑Work runs silently in the background.
- **No third‑party calls**. Fully self‑hosted and privacy‑first.
- **Built for real users**: fast, accessible, and open‑source.

👉 See [10 Reasons ALTCHA Is Better](https://altcha.org/captcha-alternative-why-altcha-is-better/)

Features
---------

[](#features-)

- Proof‑of‑Work CAPTCHA (no puzzles; background verification)
    - Server‑side challenge issuance &amp; verification filter for CI4
    - ALTCHA widget helper with auto `challengeurl`
- Proof‑of‑Work data obfuscation (protects emails, phones, and other sensitive data)
    - Cached obfuscated payloads to avoid recomputes
    - Obfuscation widget helper with localized reveal label for click to reveal
- [ALTCHA Sentinel](https://altcha.org/docs/v2/sentinel/) (advanced detection and metrics)

---

Table of Contents
------------------

[](#table-of-contents-)

- [🚀 Getting started](#-getting-started)
    - [0. Prerequisites](#0-prerequisites)
    - [1. Installation](#1-installation)
    - [2. Configuration](#2-configuration)
- [🧩 ALTCHA widgets](#-altcha-widgets)
    - [Render the widget](#render-the-widget)
    - [Render widget in obfuscation mode](#render-widget-in-obfuscation-mode)
- [⚙️ Config reference](#%EF%B8%8F-config-reference)
- [❤️ Acknowledgments](#%EF%B8%8F-acknowledgments)
- [📜 License](#-license)

🚀 Getting started
-----------------

[](#-getting-started)

### 0. Prerequisites

[](#0-prerequisites)

1. [Download or install the ALTCHA widget script](https://altcha.org/docs/v2/widget-integration/).
2. Include the ALTCHA widget script on any page that renders ``

Note

**Installing via a package manager?**

Check out [**CodeIgniter Vite 🔥⚡**](https://github.com/yassinedoghri/codeigniter-vite)for a fast and simple way to manage JavaScript and TypeScript packages in your CodeIgniter4 projects.

### 1. Installation

[](#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. Enable ALTCHA's server-side verification filter globally in your `app/Config/Filters.php` file:

    ```
    public $globals = [
        'before' => [
            // ...
            'altcha' => [
              'except' => ['api*'] // discard paths for which you want to bypass the ALTCHA verification
            ],
        ],
        // ...
    ];
    ```
4. Render the ALTCHA widget inside your forms using the `altcha_widget()`helper:

    ```

     Submit

    ```

### 2. Configuration

[](#2-configuration)

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 the class extend the original class.

```
// new file - app/Config/Altcha.php
