EN FR

JdzCaptcha

Icon-based CAPTCHA for PHP and JavaScript

Users select the least-displayed icon in a randomised grid. No distorted text, no third-party service.

Clear

About the project

JdzCaptcha is split across three repositories, each with a distinct role.

jdz/jdzcaptcha

PHP — Composer

PHP server library. Issues challenges, validates answers and renders the challenge PNG. Ships the pre-built frontend assets in assets/.

jizy-captcha

Frontend sources — Git

JavaScript, LESS and icon sources. Built with jizy-packer.

jdzcaptcha

npm package

Published build of the frontend assets — npm install jdzcaptcha. Mirrors what ships in the PHP library, for projects that prefer an npm-based asset pipeline.

Simple use

A minimal integration in four steps. Advanced usage (custom assets, translations, configuration) will be documented later.

Install the PHP library

composer require joffreydemetz/jdzcaptcha — icons ship inside the package under assets/.

Get the frontend assets

Pull the built JS + CSS from the jizy-captcha Git repository.

Wire the widget into your page

<link rel="stylesheet" href="/css/jdzcaptcha.min.css">
<script src="/js/jdzcaptcha.min.js"></script>
<div class="jdzc" data-series="streamline" data-theme="light"></div>
<script>JdzCaptcha.initialize('/captcha/load/', '.jdzc');</script>

Expose the captcha routes server-side

Your backend must answer POST /captcha/load/ (JS config), GET & POST /captcha/request/ (challenge image + AJAX) and POST /validate/ (form submission).

Inspired by IconCaptcha-PHP 3.x.
Drawings by Laurence Caveriviere.