PHPackages                             codeit/recaptcha2 - 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. [Framework](/categories/framework)
4. /
5. codeit/recaptcha2

ActiveLibrary[Framework](/categories/framework)

codeit/recaptcha2
=================

reCAPTCHA 2.0 ("NoCaptcha") Module for Zend Framework 2 and Zend Framework 3

2.0(1y ago)02BSD-3-ClausePHPPHP ^8.1

Since May 2Pushed 1y agoCompare

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

READMEChangelogDependencies (9)Versions (2)Used By (0)

reCAPTCHA 2.0 ("NoCaptcha") Module for Laminas Framework 3
==========================================================

[](#recaptcha-20-nocaptcha-module-for-laminas-framework-3)

[![Build Status](https://camo.githubusercontent.com/a72bb3767db2db2b7a26ea5f148e4d999c280f73cd73af78d7b38e1e7c9f815c/68747470733a2f2f7472617669732d63692e6f72672f427265796e646f7445636873652f726563617074636861322e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/BreyndotEchse/recaptcha2)[![Coverage Status](https://camo.githubusercontent.com/dc9595171af960c9ab5cf07e43d7cda8e21203f80ba741c8888db71ca79abeba/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f427265796e646f7445636873652f726563617074636861322f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/BreyndotEchse/recaptcha2?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6c0874fb840926648f3d14da64089dfccdc540da147ee3587bdad8d39567ac71/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f427265796e646f7445636873652f726563617074636861322f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/BreyndotEchse/recaptcha2/?branch=master)[![Packagist](https://camo.githubusercontent.com/3d6206b142833ab0ef207b00ded0fadb187163a94f2dee1159a5650d511ee8d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627265796e646f7465636873652f726563617074636861322e737667)](https://packagist.org/packages/breyndotechse/recaptcha2)

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

[](#installation)

Installation of this module uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

```
php composer.phar require codeit/recaptcha2
```

Then add `ReCaptcha2` to your `config/application.config.php`.

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use ReCaptcha2\Captcha\ReCaptcha2;
use Laminas\Form\Element;
use Laminas\Form\Form;

//...
$form->add([
    'name' => 'captcha',
    'type' => Element\Captcha::class,
    'options' => [
        'captcha' => [
            'class' => ReCaptcha2::class,
            'options' => [
                'siteKey' => '',
                'secretKey' => '',
            ],
        ],
    ],
]);
```

### Advanced configuration

[](#advanced-configuration)

```
use ReCaptcha2\Captcha\NoCaptchaService;
use ReCaptcha2\Captcha\ReCaptcha2;
use Laminas\Form\Element;
use Laminas\Form\Form;
use Laminas\Http\Client;

//...
$form->add([
    'name' => 'captcha',
    'type' => Element\Captcha::class,
    'options' => [
        'captcha' => [
            'class' => ReCaptcha2::class,                   // Required
            'options' => [
                // Required:
                'siteKey' => '',
                'secretKey' => '',
                // Optional:
                'service' => [
                    'class' => NoCaptchaService::class,     //Default = ReCaptcha2\Captcha\NoCaptchaService
                    'options' => [
                        'httpClient' => [
                            'class' => Client::class,       //Default = Laminas\Http\Client
                            'options' => [
                                //Laminas\Http\Client configuration
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
]);
```

SSL Issue / Google SSL Certificate
----------------------------------

[](#ssl-issue--google-ssl-certificate)

```
PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

```

Set the [openssl.cafile](http://php.net/manual/en/openssl.configuration.php) configuration setting in your [php.ini](http://php.net/manual/en/ini.core.php), .user.ini or .htaccess. You can find a bundle of CA certificates here: [cURL CA Certificate Bundle](https://curl.haxx.se/ca/cacert.pem). This module comes with a cacert.pem file containing the "Google Internet Authority G2" and the "GeoTrust Global CA" CA certificate.

Otherwise set the `Laminas\Http\Client` `sslcafile` configuration key:

```
$form->add([
    'name' => 'captcha',
    'type' => Element\Captcha::class,
    'options' => [
        'captcha' => [
            'class' => ReCaptcha2::class,
            'options' => [
                'siteKey' => '',
                'secretKey' => '',
                'service' => [
                    'options' => [
                        'httpClient' => [
                            'options' => [
                                'sslcafile' => ReCaptcha2\Captcha\NoCaptchaService::CACERT_PATH,
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
]);
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance48

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

381d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/945422?v=4)[codeguard](/maintainers/codeguard)[@codeguard](https://github.com/codeguard)

---

Top Contributors

[![xl32](https://avatars.githubusercontent.com/u/1729594?v=4)](https://github.com/xl32 "xl32 (2 commits)")

---

Tags

frameworklaminaszendrecaptchacaptchaZendFrameworkzf2nocaptchazf3

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/codeit-recaptcha2/health.svg)

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

###  Alternatives

[san/san-captcha

Laminas Sample For Captcha

106.5k](/packages/san-san-captcha)[webino/webino-image-thumb

Image Thumbnailer for Zend Framework 2

4079.0k](/packages/webino-webino-image-thumb)

PHPackages © 2026

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