Download the PHP package saeven/zf2-circlical-recaptcha without Composer

On this page you can find all versions of the php package saeven/zf2-circlical-recaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zf2-circlical-recaptcha

Easy Google Captcha for Zend Framework 3

Total Downloads Codacy Badge Codacy Badge Build Status

Google just rolled out their great new CAPTCHA (fewer angry old people is always great!), and you want to get it into your ZF2/ZF3 project! Please users and management alike with this easy module.

Captcha Image

Requirements

Add this line to your composer.json

Then include in your application's module.config.php. The module should now be loaded.

Configuration

Copy circlical.recaptcha.local.php into your config/autoload folder. Open it up, and insert your ReCaptcha keys - you get these from Google's website.

A third parameter is there, to help you work through functional tests (e.g., behat). You could set 'bypass' to be true (don't validate the captcha) based on some fixed environment variable, example:

The fourth is the timeout (in seconds) that you permit between the time the captcha is served, and the time that it is solved.

Templates

You need to add the captcha to your form templates, E.g., using Twig it'd look like:

For now, the g-recaptcha-response is not mutable. The reason being that Google renders it with this name, there's no option to change

Form & InputFilter

If you're unfamiliar with ZF2, here's sample form code that implements the Captcha. There's more than needed, but you can see how the Element is added, and similarly, how the counterpart InputFilter (validator) is added as well.

And here's a sample InputFilter

That's all there is to it! Note the optional no_sitekey and no_script options on the form init. These are handy if you are sticking many recaptchas on the same view, but need to dynamically fade them in and out.


All versions of zf2-circlical-recaptcha with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
laminas/laminas-servicemanager Version ^3.0.1
laminas/laminas-inputfilter Version ^2.12.0
laminas/laminas-form Version 3.1.1
laminas/laminas-view Version ^2.14
laminas/laminas-mvc Version ^3.3.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saeven/zf2-circlical-recaptcha contains the following files

Loading the files please wait ....