PHPackages                             alikhalili/simple-captcha - 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. alikhalili/simple-captcha

ActiveLibrary

alikhalili/simple-captcha
=========================

A simple PHP CAPTCHA script

1.0.1(8y ago)037MITPHP

Since Feb 25Pushed 5y agoCompare

[ Source](https://github.com/ali-khalili/simple-captcha)[ Packagist](https://packagist.org/packages/alikhalili/simple-captcha)[ Docs](http://www.abeautifulsite.net/)[ RSS](/packages/alikhalili-simple-captcha/feed)WikiDiscussions master Synced today

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

A simple PHP CAPTCHA script
===========================

[](#a-simple-php-captcha-script)

This packaged is modified version of [simple-php-captcha](https://github.com/yasirmturk/simple-php-captcha).

This code is the object oriented version of the original code.

I also tried to do minor improvements (dynamic path for fonts and background images)

*Licensed under the MIT license: *

Basic usage
-----------

[](#basic-usage)

0 - Install the package:

```
composer require alikhalili/simple-captcha

```

1- Create a captcha object:

```
$captcha = new Captcha();

```

2- Draw image

```
$captcha->config();
$image = $capthca->getImage();

//in the view
echo "";

//or in ajax response to a refresh request:
echo $image;

```

or validate the code:

```
$captchaIsValid = $captcha->verify($givenCode);

```

Thanks
------

[](#thanks)

- Thanks to Cory LaViska for the base code and Yasir M Türk for the [forked repository](https://github.com/yasirmturk/simple-php-captcha).
- Special thanks to Subtle Patterns for the patterns used for default backgrounds:
- Special thanks to dafont.com for providing Times New Yorker:

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 61.4% 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 ~487 days

Total

2

Last Release

3238d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ecb60d430321dd2be1f985a4fdc11f26352f97665e669454bbf94d1a5492232?d=identicon)[Ali Khalili](/maintainers/Ali%20Khalili)

---

Top Contributors

[![claviska](https://avatars.githubusercontent.com/u/55639?v=4)](https://github.com/claviska "claviska (27 commits)")[![ali-khalili](https://avatars.githubusercontent.com/u/6051111?v=4)](https://github.com/ali-khalili "ali-khalili (11 commits)")[![ALSchwalm](https://avatars.githubusercontent.com/u/1063999?v=4)](https://github.com/ALSchwalm "ALSchwalm (2 commits)")[![yasirmturk](https://avatars.githubusercontent.com/u/306691?v=4)](https://github.com/yasirmturk "yasirmturk (2 commits)")[![k00ni](https://avatars.githubusercontent.com/u/381727?v=4)](https://github.com/k00ni "k00ni (1 commits)")[![macedd](https://avatars.githubusercontent.com/u/211201?v=4)](https://github.com/macedd "macedd (1 commits)")

### Embed Badge

![Health badge](/badges/alikhalili-simple-captcha/health.svg)

```
[![Health](https://phpackages.com/badges/alikhalili-simple-captcha/health.svg)](https://phpackages.com/packages/alikhalili-simple-captcha)
```

PHPackages © 2026

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