2017 © Pedro Peláez
 

library losrecaptcha

ZF2 module for integration with new ReCaptcha service form Google

image

los/losrecaptcha

ZF2 module for integration with new ReCaptcha service form Google

  • Monday, April 9, 2018
  • by Lansoweb
  • Repository
  • 3 Watchers
  • 3 Stars
  • 15,785 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 11 Versions
  • 3 % Grown

The README.md

LosReCaptcha

PHP module for using the ReCaptcha v2 system from Google, (*1)

https://www.google.com/recaptcha/intro/index.html, (*2)

Zend Form

To use with Zend\Form, just initialize like the default ReCaptcha element:, (*3)

$this->add([
   'name' => 'captcha',
    'type' => 'captcha',
    'options' => [
        'captcha' => new LosReCaptcha\Captcha\ReCaptcha([
            'site_key' => $siteKey,
            'secret_key' => $siteSecret,
        ]),
    ],
]);

For Invisible ReCaptcha:, (*4)

// ...
$this->add([
   'name' => 'captcha',
    'type' => 'captcha',
    'options' => [
        'captcha' => new \LosReCaptcha\Captcha\Invisible([
            'site_key' => $siteKey,
            'secret_key' => $siteSecret,
            'callback' => 'captchaSubmit', // Callback to submit the form
            'button_id' => 'submit-button', // Button id to submit the form
        ]),
    ],
]);
// ...
$this->add([
    'name' => 'submit-button',
    'type' => \Zend\Form\Element\Button::class,
    'options' => [
        'label' => _('Log In'),
    ],
    'attributes' => [
        'id'    => 'submit-button',
        'class' => 'btn btn-block btn-primary',
        'value' => _('Log In'),
    ],
]);

In the view for Invisible ReCaptcha:, (*5)

function captchaSubmit() {
  // Any js code, eg. fields validation
  document.getElementById("login").submit();
}

For Zend Expressive, you can inject the configuration with the ConfigProvider inside your config/config.php:, (*6)

<?php
// ...
$aggregator = new ConfigAggregator([
    // ...
    \LosReCaptcha\ConfigProvider::class,
    // ...
], $cacheConfig['config_cache_path']);

return $aggregator->getMergedConfig();

The Versions

09/04 2018

dev-master

9999999-dev http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los

09/04 2018

2.1.0

2.1.0.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los

09/04 2018

dev-feature/invisible

dev-feature/invisible http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los

19/06 2017

dev-develop

dev-develop http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 captcha module recaptcha los

24/01 2017

2.0.2

2.0.2.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 captcha module recaptcha los

30/08 2016

2.0.1

2.0.1.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 captcha module recaptcha los

28/08 2016

2.0.0

2.0.0.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

zf2 captcha module recaptcha los

02/08 2015

1.0.x-dev

1.0.9999999.9999999-dev http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los

28/04 2015

1.0.0

1.0.0.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los

22/03 2015

0.9.1

0.9.1.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los

19/03 2015

0.9.0

0.9.0.0 http://github.com/Lansoweb/LosReCaptcha

ZF2 module for integration with new ReCaptcha service form Google

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zf2 captcha module recaptcha los