PHPackages                             nocvp/zf3-php7-recaptcha-v2 - 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. nocvp/zf3-php7-recaptcha-v2

ActiveLibrary[Security](/categories/security)

nocvp/zf3-php7-recaptcha-v2
===========================

ReCaptcha v2.0 module for Zend Framework 3 (ZF3) and Php7

1.4.3(10y ago)11.8kMITPHPPHP &gt;=7.0

Since May 26Pushed 10y ago3 watchersCompare

[ Source](https://github.com/nocvp/zf3-php7-recaptcha-v2)[ Packagist](https://packagist.org/packages/nocvp/zf3-php7-recaptcha-v2)[ Docs](https://github.com/nocvp/zf3-php7-recaptcha-v2)[ RSS](/packages/nocvp-zf3-php7-recaptcha-v2/feed)WikiDiscussions master Synced 4w ago

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

Zf3Php7Recaptcha - A ZF3 Module for Google ReCaptchaV2
======================================================

[](#zf3php7recaptcha---a-zf3-module-for-google-recaptchav2)

Zf3Php7Recaptcha is forked by [zf2-recaptcha](https://github.com/malganis93/BrlReCaptcha) features.

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

[](#installation)

### with composer

[](#with-composer)

Just add the following line to your requirements:

```
"nocvp/zf3-php7-recaptcha-v2": "dev-master"
```

and run

```
php composer.phar update
```

Since there are problems with the SSL-Cert if you use Adapter\\Socket, please install php-curl!

Then activate the module in your application.config.php :

```
```php
return array(
    'modules' => array(
        // ...
        'Zf3Php7Recaptcha',
    ),
    // ...
);
```

```

Get your private-key
--------------------

[](#get-your-private-key)

To use this service, you have to register at [Google ReCaptcha](https://www.google.com/recaptcha) using your Google-Account.

Usage
-----

[](#usage)

### with Zend\\From

[](#with-zendfrom)

This module works similar as [ZendFrameworkService\\ReCaptcha](https://github.com/zendframework/ZendService_ReCaptcha).

Just add the following lines to your form creation:

```
$element = new \Zend\Captcha\Captcha('g-recaptcha-response');
$element->setCaptcha(new Zf3Php7Recaptcha\ReCaptcha(array('private_key' => 'YOUR_SECRET FROM GOOGLE', 'public_key' => 'YOUR_PUBLIC_KEY', 'theme' => 'dark')));
$form->add($element);

```

Important: The element has to be named g-recaptcha-response due to the reason that the JS from google creates this virtual input.

Remember to add this element to your validationChain as well.

Note: The theme parameter is not required. By default the light theme is used.

It acts the same way as any other built-in captcha solution.

### with ServiceManager

[](#with-servicemanager)

If you like to implement the view on your own, just use the Service\\ReCaptchaService. It handles the whole communication between your code and the ReCaptcha API.

```
$recaptcha = $serviceLocator->get('Zf3Php7Recaptcha\Service\ReCaptcha');

```

### other

[](#other)

just look into the sources! It's pretty easy to understand.

TODO
----

[](#todo)

- PHPUnit Tests are missing -&gt; Will do this in the next couple of days
- some error handling is qnd
- better documentation

Questions?
----------

[](#questions)

If you have any problems or questions regarding my code, please create an issue. Since i'm using this module for my own projects i'm interested in keeping this up to date!

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 71.9% 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

4

Last Release

3684d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6cd83d6b6c035e0082e898195d02aa9fb561d10be79e5a6946b8815be8bc33f8?d=identicon)[semihs](/maintainers/semihs)

---

Top Contributors

[![malganis93](https://avatars.githubusercontent.com/u/1519805?v=4)](https://github.com/malganis93 "malganis93 (23 commits)")[![semihs](https://avatars.githubusercontent.com/u/4303177?v=4)](https://github.com/semihs "semihs (8 commits)")[![tdutrion](https://avatars.githubusercontent.com/u/1712222?v=4)](https://github.com/tdutrion "tdutrion (1 commits)")

---

Tags

recaptchacaptchaPHP7zf3

### Embed Badge

![Health badge](/badges/nocvp-zf3-php7-recaptcha-v2/health.svg)

```
[![Health](https://phpackages.com/badges/nocvp-zf3-php7-recaptcha-v2/health.svg)](https://phpackages.com/packages/nocvp-zf3-php7-recaptcha-v2)
```

###  Alternatives

[phelium/recaptcha

reCAPTCHA v2 class

4391.9k](/packages/phelium-recaptcha)[cakephp-fr/recaptcha

To easily use Google Recaptcha (free CAPTCHA service that protect websites from spam and abuse) in CakePHP projects

1419.5k](/packages/cakephp-fr-recaptcha)[cake17/cakephp-recaptcha

\[DEPRECIATED\] Please use https://github.com/cakephp-fr/recaptcha/

1111.1k1](/packages/cake17-cakephp-recaptcha)

PHPackages © 2026

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