PHPackages                             jublonet/catcha - 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. jublonet/catcha

ActiveLibrary[Security](/categories/security)

jublonet/catcha
===============

Catch-a spammer with a CAPTCHA.

1.0.1(13y ago)017GPL-3.0PHP

Since May 22Pushed 12y ago1 watchersCompare

[ Source](https://github.com/jublo/catcha)[ Packagist](https://packagist.org/packages/jublonet/catcha)[ RSS](/packages/jublonet-catcha/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (5)Used By (0)

catcha
======

[](#catcha)

*Catch-a spammer with a CAPTCHA.*

Copyright (C) 2013-2014 Jublo IT Solutions &lt;&gt;

This program 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.

This program 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 .

Please enable the GD extension in your PHP environment.

Getting started
---------------

[](#getting-started)

1. Generate a challenge

```
require_once 'catcha.php';

$catcha = new Catcha;
$catcha->outputImage();

```

2. Store the Catcha object

```
$_SESSION['catcha'] = $catcha;

```

3. After the user enters the solution, restore the object

```
$catcha = $_SESSION['catcha'];

```

4. Check if the entered result was correct

```
$entered_result = -1;
if (isset($_POST['your_field_name'])) {
    $entered_result = intval($_POST['your_field_name']);
}
$catcha_solved = $catcha->isCorrectResult($entered_result);

```

Adapting to your needs
----------------------

[](#adapting-to-your-needs)

### Set a custom challenge canvas image size

[](#set-a-custom-challenge-canvas-image-size)

The canvas size defaults to 100 x 25 pixels. Customize the size:

```
$catcha->setImageSize($desired_width, $desired_height);

```

### Use a custom font

[](#use-a-custom-font)

By default, Catcha uses the Averia Light font licensed under the SIL Open Font License Version 1.1 (). You may as well use a custom True Type font (\*.ttf):

```
$catcha->setImageFont($path_to_font);

```

### Paint the canvas in a different color

[](#paint-the-canvas-in-a-different-color)

The supported color codes include (upper- and lower case)

- \#ffff00
- ffff00
- ff0

```
$catcha->setImageColorBackground('#ffff00');

```

### Write the equation in a different color

[](#write-the-equation-in-a-different-color)

```
$catcha->setImageColorForeground('#ff0000');

```

### Generate a new challenge and discard the old one

[](#generate-a-new-challenge-and-discard-the-old-one)

```
$catcha->newChallenge();

```

### Get raw image data without sending to browser

[](#get-raw-image-data-without-sending-to-browser)

The raw image data are in binary JPEG format, quality 80.

```
$image_data = $catcha->getImage();

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 93.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 ~0 days

Total

3

Last Release

4787d ago

Major Versions

0.1.0 → 1.0.02013-05-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6348321?v=4)[Joachim Rütter](/maintainers/mynetx)[@mynetx](https://github.com/mynetx)

---

Top Contributors

[![mynetx](https://avatars.githubusercontent.com/u/6348321?v=4)](https://github.com/mynetx "mynetx (14 commits)")[![ZweiSteinSoft](https://avatars.githubusercontent.com/u/157944?v=4)](https://github.com/ZweiSteinSoft "ZweiSteinSoft (1 commits)")

### Embed Badge

![Health badge](/badges/jublonet-catcha/health.svg)

```
[![Health](https://phpackages.com/badges/jublonet-catcha/health.svg)](https://phpackages.com/packages/jublonet-catcha)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.0M138](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25772.0k36](/packages/paragonie-ecc)

PHPackages © 2026

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