Securimage: Free Open-Source PHP CAPTCHA

The PHP CAPTCHA Library & Developer Reference

🔓

Free & Open Source

GPL-licensed, used by thousands of PHP sites since 2008. No API keys, no external dependencies, no tracking.

🛠

PHP 8 Compatible

Works with modern PHP 8.0+. Requires the GD extension (standard on most hosts). Drop-in integration in minutes.

📈

CAPTCHA Alternatives

Comparing reCAPTCHA v3, hCaptcha, Cloudflare Turnstile, honeypot techniques, and more — with honest trade-offs.

Quick Start

1

Download Securimage

composer require dapphp/securimage
# or download from https://github.com/dapphp/securimage
2

Show the CAPTCHA image

<?php
require 'securimage/securimage.php';
$img = new Securimage();
$img->show(); // outputs CAPTCHA image and stores code in session
3

Validate on form submit

<?php
require 'securimage/securimage.php';
$img = new Securimage();
if ($img->check($_POST['captcha_code']) === false) {
    die('Incorrect CAPTCHA. Please try again.');
}
// CAPTCHA passed — process the form

Full Documentation →

What is Securimage?

Securimage is an open-source, free PHP CAPTCHA script for generating complex images and CAPTCHA codes to protect forms from spam and abuse. It can be added to any existing PHP form in minutes — no API keys, no external services, no data sent to third parties. As long as your server has PHP and the GD extension, Securimage works.

The library has been used by PHP developers worldwide since 2008 and is actively maintained on GitHub under the GPL license.

Features

Evaluating Your Options in 2026?

Securimage remains an excellent choice when you need a self-hosted, zero-dependency CAPTCHA with no external data collection. But the CAPTCHA landscape has changed significantly since 2008. Cloudflare Turnstile, hCaptcha, and reCAPTCHA v3 offer invisible or near-invisible bot detection that many users prefer.

We cover the full landscape in our CAPTCHA alternatives guide — an honest comparison of every major option in 2026, including when Securimage is still the right choice.

Download & Source Code

Securimage is available on GitHub. The latest release supports PHP 7.2+ through PHP 8.x.

View on GitHub → Quickstart Guide →

Evaluating your CAPTCHA options in 2026?

Securimage is the best choice for self-hosted PHP sites that need zero dependencies and full control. But if you need invisible CAPTCHA, better accessibility, or SaaS convenience, there are good alternatives.

Compare CAPTCHA Options →