PHPackages                             refda/captcheck - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. refda/captcheck

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

refda/captcheck
===============

PHP Captcha Library

v0.4(9y ago)05PHP

Since Jun 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/refda/captcheck)[ Packagist](https://packagist.org/packages/refda/captcheck)[ RSS](/packages/refda-captcheck/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (6)Used By (0)

[![Captcheck](https://camo.githubusercontent.com/2fd0b22fb1eb4c8ee26bceb8cf9ff583efd1bde3af129c3483dcc1b8517647e9/68747470733a2f2f736f757263652e6e657473796d732e636f6d2f4e657473796d732f43617074636865636b2f7261772f6d61737465722f6c6f676f2e706e67)](https://camo.githubusercontent.com/2fd0b22fb1eb4c8ee26bceb8cf9ff583efd1bde3af129c3483dcc1b8517647e9/68747470733a2f2f736f757263652e6e657473796d732e636f6d2f4e657473796d732f43617074636865636b2f7261772f6d61737465722f6c6f676f2e706e67)

Easy, light, self-hostable CAPTCHA service. Works on modern browsers (and IE9+). Uses a selection of icons from Font-Awesome. Text-only accessibility mode and support for keyboard-only operation.

Thanks to textcaptcha.com for supplying the data for the text CAPTCHA.

How to use
----------

[](#how-to-use)

In your form, put an empty div with the class "captcheck\_container". Add `captcheck.js` (or `captcheck.min.js`) into your page.

```

        Captcheck Sample Form

            Submit Form

```

When the form is submitted, your server will receive two extra form fields: `captcheck_session_code` and `captcheck_selected_answer`. In your form handling code, send a request to `http(s)://captcheck-url/api.php`. Pass the variables `session_id` and `answer_id` with the values sent with the form, and also pass the variable `action` with the value `verify`. You will receive a JSON response with (among other things) `"result": true` or `"result": false`. If result is false, the user failed the test, and another variable `msg` is available with an explanation.

Example URL: `http(s)://captcheck-url/api.php?action=verify&session_id=&answer_id=`

Example responses: `{"session":"some_session_id","result":true}``{"session":"some_session_id","result":false,"msg":"Answer incorrect."}`

\###Content-Security-Policy and Nonces

Add `data-stylenonce="nonce_here"` to the `.captcheck_container` div. If you have multiple CAPTCHAs on one page, only one of them needs the nonce specified.

Installation
------------

[](#installation)

1. Run composer install.
2. Copy settings.template.php to settings.php and plug in your settings.
3. Install the database.
4. Customize captcheck.js with the correct api\_url.
5. Follow the How to Use section and the example setup in test.html and test.php.

Execution Flow
--------------

[](#execution-flow)

```
JS = captcheck.js, API = api.php, FORM = parent form,
SITE = form processing code, -> = some action taken on the right by the left

JS -> API:      Request session ID, question, and answers (with scrambled random codes)
API -> JS:      Sends info, saves session ID, correct answer, and scrambled answer codes in DB
JS -> API:      Requests answer images by sending scrambled value and session ID
JS -> FORM:     Adds hidden field with value=session ID, displays question and images (or text box)
[USER SUBMITS FORM]
SITE -> API:    Sends session ID and answer
API -> SITE:    Responds with true/false to indicate if the answer is valid, marks session as expired to prevent CAPTCHA reuse

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% 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 ~1 days

Total

5

Last Release

3307d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac8f10cb54aa5d88c2ee4ae12b6ae9895535918d8ef0bb1eefc09687433bfbe3?d=identicon)[refda](/maintainers/refda)

---

Top Contributors

[![skylarmt](https://avatars.githubusercontent.com/u/6668965?v=4)](https://github.com/skylarmt "skylarmt (30 commits)")[![refda](https://avatars.githubusercontent.com/u/2878551?v=4)](https://github.com/refda "refda (4 commits)")

### Embed Badge

![Health badge](/badges/refda-captcheck/health.svg)

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

PHPackages © 2026

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