PHPackages                             d3mo17/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. [Security](/categories/security)
4. /
5. d3mo17/captcha

ActiveLibrary[Security](/categories/security)

d3mo17/captcha
==============

Provides a captcha mechanism

0.9.8(4y ago)076mitPHPPHP &gt;=7.1

Since Feb 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/d3mo17/captcha)[ Packagist](https://packagist.org/packages/d3mo17/captcha)[ RSS](/packages/d3mo17-captcha/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (5)Used By (0)

Captcha
=======

[](#captcha)

A library trying to secure form submits without the need of separate user input (code read from distorted image).

Mode of operation
-----------------

[](#mode-of-operation)

Class "Code" generates an array with seven keys. It depends on the current server time which keys will become set with values and which not. The idea is to create seven input elements in a form, put the values from the generated array into the input elements, submit these values along with the other input data from user, restore the original code array from incoming request on server side and validate the restored array against class "Code" again.

So basically the only methods you need after instance object from class `\DMo\Captcha\Code`, are `get` to fetch the generated code and `validate` to compare restored array from request.

You can use class `\DMo\Captcha\HTMLGenerator` to generate the html-code for the input elements from instance of class `\DMo\Captcha\Code` and also to restore the code array from incoming request parameters after the form submit.

Please have a look to the examples for more clarity.

License
-------

[](#license)

The MIT License (MIT)

Copyright (c) 2022 Daniel Moritz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~5 days

Total

4

Last Release

1572d ago

PHP version history (2 changes)0.9.2PHP &gt;=7.4

0.9.8PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/5daec3833f179c7b282af528f0f90e2453b7cde134c61f541761573d80658831?d=identicon)[d3mo17](/maintainers/d3mo17)

---

Top Contributors

[![d3mo17](https://avatars.githubusercontent.com/u/2270841?v=4)](https://github.com/d3mo17 "d3mo17 (16 commits)")

---

Tags

securitycaptchaForms

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[gregwar/captcha-bundle

Captcha bundle

3684.9M33](/packages/gregwar-captcha-bundle)[s1syphos/php-simple-captcha

Simple captcha generator

2740.9k11](/packages/s1syphos-php-simple-captcha)[lorddashme/php-simple-captcha

A simple captcha package that fit to any type of web application built on php.

113.0k](/packages/lorddashme-php-simple-captcha)

PHPackages © 2026

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