PHPackages                             tonyaxo/yii2-recaptcha - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tonyaxo/yii2-recaptcha

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

tonyaxo/yii2-recaptcha
======================

Yii2 Google reCaptcha implementation

1.0(7y ago)11.8kMITPHP

Since Aug 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tonyaxo/yii2-recaptcha)[ Packagist](https://packagist.org/packages/tonyaxo/yii2-recaptcha)[ RSS](/packages/tonyaxo-yii2-recaptcha/feed)WikiDiscussions master Synced 4w ago

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

Yii2 Google reCaptcha
=====================

[](#yii2-google-recaptcha)

Yii2 Google reCAPTCHA version 2.0 implementation.

[![Total Downloads](https://camo.githubusercontent.com/418035437023fb98b1da750646d4a6a13c501b0025402fa2eb87df4eeb26a25f/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d61757468636c69656e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/tonyaxo/yii2-recaptcha)

Overview
--------

[](#overview)

ReCaptcha API version 2.0 [docs](https://developers.google.com/recaptcha/intro).

### Features

[](#features)

- All reCAPTCHA API 2.0 features;
- Multiple support;
- Ajax (Pjax) support;
- jQuery not require;

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist tonyaxo/yii2-recaptcha "~1.0"

```

or add

```
"tonyaxo/yii2-recaptcha": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

```
'components' => [
    'recaptcha' => [
        'class' => 'recaptcha\ReCaptchaComponent',
        'siteKey' => 'site_key',
        'secretKey' => 'key_secret',
    ],
];
```

You can also use this widget in an \[\[yii\\widgets\\ActiveForm|ActiveForm\]\] using the \[\[yii\\widgets\\ActiveField::widget()|widget()\]\] method, for example like this:

```
