PHPackages                             ca-dsgn/securimage - 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. ca-dsgn/securimage

ActiveLibrary[Security](/categories/security)

ca-dsgn/securimage
==================

PHP CAPTCHA Library

4.0.3(10mo ago)12BSD-3-ClausePHPPHP &gt;=8.4

Since Apr 1Pushed 10mo agoCompare

[ Source](https://github.com/ca-dsgn/securimage)[ Packagist](https://packagist.org/packages/ca-dsgn/securimage)[ Docs](https://github.com/ca-dsgn/securimage)[ RSS](/packages/ca-dsgn-securimage/feed)WikiDiscussions nextgen Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Name
----

[](#name)

**Securimage** - A PHP class for creating captcha images and audio with many options.

Version
-------

[](#version)

**4.0.2**

Project Status
--------------

[](#project-status)

Securimage is no longer maintained. Seek an alternative such as [hCaptcha](https://hcaptcha.com/).

You may use, modify, and distribute the code in accordance with the [license](LICENSE.txt).

See the [Project Status](https://github.com/dapphp/securimage/issues/99) issue on GitHub.

Download
--------

[](#download)

The code will remain available to view and download at .

To use or modify the code, start with the 4.0 (nextgen) branch. It has many features and additions so the 3.6 branch should be considered even more obsolete.

Requirements
------------

[](#requirements)

- PHP 7.0 or greater
- GD 2.0
- FreeType (Required, for TTF fonts)
- PDO (if using Sqlite, MySQL, or PostgreSQL)

Synopsis
--------

[](#synopsis)

See the [example form](example_form.php) to get started. PHP sessions are not required if database storage is used instead.

Description
-----------

[](#description)

What is **Securimage**?

Securimage is a PHP class that is used to generate and validate CAPTCHA images.

The classes uses an existing PHP session or creates its own if none is found to store the CAPTCHA code. In addition, a database can be used instead of session storage.

Variables within the class are used to control the style and display of the image. The class uses TTF fonts and effects for strengthening the security of the image.

It also creates audible codes which are played for visually impared users.

UPGRADE NOTICE
--------------

[](#upgrade-notice)

**3.6.3 and below:**Securimage 3.6.4 fixed a XSS vulnerability in example\_form.ajax.php. It is recommended to upgrade to the latest version or delete example\_form.ajax.php from the securimage directory on your website.

**3.6.2 and above:**

If you are upgrading to 3.6.2 or greater *AND* are using database storage, the table structure has changed in 3.6.2 adding an audio\_data column for storing audio files in the database in order to support HTTP range requests. Delete your tables and have Securimage recreate them or see the function createDatabaseTables() in securimage.php for the new structure depending on which database backend you are using and alter the tables as needed. If using SQLite, just overwrite your existing securimage.sq3 file with the one from this release.

*If you are not using database tables for storage, ignore this notice.*

Copyright
---------

[](#copyright)

Script Copyright (c) 2018 Drew Phillips All rights reserved.

```
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice,
  this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

```

Licenses
--------

[](#licenses)

**WavFile.php**

```
The WavFile.php class used in Securimage by Drew Phillips and Paul Voegler
is used under the BSD License.  See WavFile.php for details.
Many thanks to Paul Voegler (http://www.voegler.eu/) for contributing to
Securimage.

```

Script
------

[](#script)

**Flash code for Securimage**

Flash code created by Age Bosma &amp; Mario Romero () Many thanks for releasing this to the project!

---

**HKCaptcha**

Portions of Securimage contain code from Han-Kwang Nienhuys' PHP captcha

```
Han-Kwang Nienhuys' PHP captcha
Copyright June 2007

This copyright message and attribution must be preserved upon
modification. Redistribution under other licenses is expressly allowed.
Other licenses include GPL 2 or higher, BSD, and non-free licenses.
The original, unrestricted version can be obtained from
http://www.lagom.nl/linux/hkcaptcha/

```

---

**AHGBold.ttf**

```
AHGBold.ttf (AlteHaasGroteskBold.ttf) font was created by Yann Le Coroller
and is distributed as freeware.

Alte Haas Grotesk is a typeface that look like an helvetica printed in an
old Muller-Brockmann Book.

These fonts are freeware and can be distributed as long as they are
together with this text file.

I would appreciate very much to see what you have done with it anyway.

yann le coroller
www.yannlecoroller.com
yann@lecoroller.com

```

---

**PopForge Flash Library**

Portions of securimage\_play.swf use the PopForge flash library for playing audio

```
/**
 * Copyright(C) 2007 Andre Michelle and Joa Ebert
 *
 * PopForge is an ActionScript3 code sandbox developed by Andre Michelle
 * and Joa Ebert
 * http://sandbox.popforge.de
 *
 * PopforgeAS3Audio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * PopforgeAS3Audio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see
 */

```

---

**Graphics**

Some graphics used are from the Humility Icon Pack by WorLord

```
 License: GNU/GPL (http://findicons.com/pack/1723/humility)
 http://findicons.com/icon/192558/gnome_volume_control
 http://findicons.com/icon/192562/gtk_refresh

```

---

**Background noise sound files are from SoundJay.com**

```
 All sound effects on this website are created by us and protected under
 the copyright laws, international treaty provisions and other applicable
 laws. By downloading sounds, music or any material from this site implies
 that you have read and accepted these terms and conditions:

 Sound Effects
 You are allowed to use the sounds free of charge and royalty free in your
 projects (such as films, videos, games, presentations, animations, stage
 plays, radio plays, audio books, apps) be it for commercial or
 non-commercial purposes.

 But you are NOT allowed to
 - post the sounds (as sound effects or ringtones) on any website for
   others to download, copy or use
 - use them as a raw material to create sound effects or ringtones that
   you will sell, distribute or offer for downloading
 - sell, re-sell, license or re-license the sounds (as individual sound
   effects or as a sound effects library) to anyone else
 - claim the sounds as yours
 - link directly to individual sound files
 - distribute the sounds in apps or computer programs that are clearly
   sound related in nature (such as sound machine, sound effect
   generator, ringtone maker, funny sounds app, sound therapy app, etc.)
   or in apps or computer programs that use the sounds as the program's
   sound resource library for other people's use (such as animation
   creator, digital book creator, song maker software, etc.). If you are
   developing such computer programs, contact us for licensing options.

 If you use the sound effects, please consider giving us a credit and
 linking back to us but it's not required.

```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance53

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~449 days

Total

2

Last Release

328d ago

PHP version history (2 changes)4.0.2PHP &gt;=5.4

4.0.3PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1cc959db562f9532a23dcee70fed92210135682b69a367e9156c0412c8cac4e?d=identicon)[CA Design](/maintainers/CA%20Design)

---

Top Contributors

[![dapphp](https://avatars.githubusercontent.com/u/552712?v=4)](https://github.com/dapphp "dapphp (215 commits)")[![Maescool](https://avatars.githubusercontent.com/u/197110?v=4)](https://github.com/Maescool "Maescool (6 commits)")[![ca-dsgn](https://avatars.githubusercontent.com/u/604636?v=4)](https://github.com/ca-dsgn "ca-dsgn (3 commits)")[![mirabellette](https://avatars.githubusercontent.com/u/34450971?v=4)](https://github.com/mirabellette "mirabellette (1 commits)")[![mlocati](https://avatars.githubusercontent.com/u/928116?v=4)](https://github.com/mlocati "mlocati (1 commits)")[![pathumhdes](https://avatars.githubusercontent.com/u/5234885?v=4)](https://github.com/pathumhdes "pathumhdes (1 commits)")[![rlerdorf](https://avatars.githubusercontent.com/u/54641?v=4)](https://github.com/rlerdorf "rlerdorf (1 commits)")[![ruifil](https://avatars.githubusercontent.com/u/1698037?v=4)](https://github.com/ruifil "ruifil (1 commits)")[![atkrad](https://avatars.githubusercontent.com/u/351364?v=4)](https://github.com/atkrad "atkrad (1 commits)")[![snipershady](https://avatars.githubusercontent.com/u/20489856?v=4)](https://github.com/snipershady "snipershady (1 commits)")[![cboden](https://avatars.githubusercontent.com/u/617694?v=4)](https://github.com/cboden "cboden (1 commits)")[![dregad](https://avatars.githubusercontent.com/u/449891?v=4)](https://github.com/dregad "dregad (1 commits)")

---

Tags

securitycaptchaFormsanti-spam

### Embed Badge

![Health badge](/badges/ca-dsgn-securimage/health.svg)

```
[![Health](https://phpackages.com/badges/ca-dsgn-securimage/health.svg)](https://phpackages.com/packages/ca-dsgn-securimage)
```

###  Alternatives

[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[gregwar/captcha-bundle

Captcha bundle

3524.7M32](/packages/gregwar-captcha-bundle)[phpmussel/phpmussel

PHP-based anti-virus anti-trojan anti-malware solution.

431228.1k1](/packages/phpmussel-phpmussel)[s1syphos/php-simple-captcha

Simple captcha generator

2737.8k6](/packages/s1syphos-php-simple-captcha)[fabianwennink/iconcaptcha

IconCaptcha is a self-hosted, customizable, easy-to-implement and user-friendly captcha.

17740.5k1](/packages/fabianwennink-iconcaptcha)[usarise/turnstile

PHP library for Turnstile, is Cloudflare’s smart CAPTCHA alternative. It can be embedded into any website without sending traffic through Cloudflare and works without showing visitors a CAPTCHA.

2393.5k6](/packages/usarise-turnstile)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
