PHPackages                             ivanamat/cakephp-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ivanamat/cakephp-captcha

ActiveCakephp-plugin[Authentication &amp; Authorization](/categories/authentication)

ivanamat/cakephp-captcha
========================

CakePHP 4.5.x - reCAPTCHA plugin

2.0(2y ago)6183MITPHPPHP &gt;=7.4

Since Aug 29Pushed 2y ago2 watchersCompare

[ Source](https://github.com/ivanamat/cakephp-captcha)[ Packagist](https://packagist.org/packages/ivanamat/cakephp-captcha)[ Docs](https://github.com/ivanamat/cakephp-captcha)[ RSS](/packages/ivanamat-cakephp-captcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

CakePHP 4.5.x - reCAPTCHA
=========================

[](#cakephp-45x---recaptcha)

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

[](#installation)

### Composer

[](#composer)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require ivanamat/cakephp-captcha

```

### Git submodule

[](#git-submodule)

```
git submodule add git@github.com:ivanamat/cakephp-captcha.git plugins/Captcha
git submodule init
git submodule update

```

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

[](#getting-started)

Get reCAPTCHA **secret** at

Configure
---------

[](#configure)

Set the secret in your `config/bootstrap.php` file.

```
    Configure::write('Captcha.secret','MY_SECRET_KEY');

```

Load Component
--------------

[](#load-component)

Load component in the `initialize()` function

```
    class MyController extends AppController {

        public function initialize() {
            parent::initialize();

            $this->loadComponent('Captcha.Captcha');
        }

    }
```

...or load the component in the `array of components`.

```
    class MyController extends AppController {

        public $components = [
            'Captcha' => [
                'className' => 'Captcha.Captcha'
            ]
        ];

    }
```

Easy to use
-----------

[](#easy-to-use)

### Controller

[](#controller)

```
    # MyController

    $ip = getenv('REMOTE_ADDR');
    $gRecaptchaResponse = $this->request->data['g-recaptcha-response'];

    $captcha = $this->Captcha->check($ip,$gRecaptchaResponse);

    if($captcha->errorCodes == null) {
        // Success
    } else {
        // Fail! Maybe a bot?
    }
```

### HTML

[](#html)

Paste this snippet before the closing tag `` in the HTML template

```

```

Paste this snippet at the end of the `` where you want the reCAPTCHA widget to appear. Replace `YOUR-SITEKEY` with your own site key.

```

```

About CakePHP 4.x - reCAPTCHA
-----------------------------

[](#about-cakephp-4x---recaptcha)

CakePHP 4.x - Captcha uses the [reCAPTCHA](https://github.com/google/recaptcha) third-party library.
You can download [reCAPTCHA](https://github.com/google/recaptcha) from official website: \[)

[Google reCAPTCHA](https://developers.google.com/recaptcha)

Contributors
------------

[](#contributors)

Iván Amat on [GitHub](https://github.com/ivanamat) and [www.ivanamat.es](http://www.ivanamat.es/)
BusaniPrepaid on [GitHub](https://github.com/BusaniPrepaid)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 95.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 ~2774 days

Total

2

Last Release

774d ago

Major Versions

1.0 → 2.02024-04-04

PHP version history (2 changes)1.0PHP &gt;=5.4.16

2.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/52491748e5e20d24a31cbada12e13465ca2ce6c72f60d3908c422c3717fd1b58?d=identicon)[ivanamat](/maintainers/ivanamat)

---

Top Contributors

[![ivanamat](https://avatars.githubusercontent.com/u/14802779?v=4)](https://github.com/ivanamat "ivanamat (20 commits)")[![BusaniPrepaid](https://avatars.githubusercontent.com/u/156653825?v=4)](https://github.com/BusaniPrepaid "BusaniPrepaid (1 commits)")

---

Tags

plugingooglecakephprecaptchacaptchacakephp3cake3cakephp4

### Embed Badge

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

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

###  Alternatives

[arcanedev/no-captcha

No CAPTCHA (new Google reCAPTCHA) with Laravel support

370730.4k6](/packages/arcanedev-no-captcha)[crabstudio/recaptcha

Easily use Google Recaptcha in CakePHP projects

20112.2k1](/packages/crabstudio-recaptcha)[ivanamat/cakephp3-aclmanager

AclManager plugin for CakePHP 3.x

2715.2k](/packages/ivanamat-cakephp3-aclmanager)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

129228.6k10](/packages/dereuromark-cakephp-tinyauth)[contributte/recaptcha

Google reCAPTCHA for Nette - Forms

421.3M4](/packages/contributte-recaptcha)[xety/cake3-cookieauth

A simple Cake3 plugin to authenticate users with Cookies.

1954.7k2](/packages/xety-cake3-cookieauth)

PHPackages © 2026

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