Download the PHP package wdmg/yii2-recaptcha without Composer

On this page you can find all versions of the php package wdmg/yii2-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 yii2-recaptcha

Yii2 Downloads Packagist Version Progress GitHub license

Yii2 ReCaptcha

Google ReCaptcha widget for Yii2

Requirements

Installation

To install the widget, run the following command in the console:

$ composer require "wdmg/yii2-recaptcha"

Usage

Add in your view:

And add in your model validation rules:

Widget options

Name Type Default Description
language string en See https://developers.google.com/recaptcha/docs/language.
siteKey string null Your public sitekey.
apiURL string null The URL for reCaptcha API (//www.google.com/recaptcha/api.js or use alternative URL if necessary '//www.recaptcha.net/recaptcha/api.js').
callbacks array [] Javascript callback`s for reCaptcha events.
render string explicit Optional. Whether to render the widget explicitly. Defaults to onload, which will render the widget in the first g-recaptcha tag it finds..
theme string light Optional. The color theme of the widget
type string null Optional. The type of CAPTCHA to serve.
badge string null Optional. Reposition the reCAPTCHA badge. 'inline' lets you position it with CSS.
size string null Optional. The size of the widget. Use invisible value for create an invisible widget bound to a div and programmatically executed.
tabIndex integer 0 Optional. The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier.
isolated boolean false Optional. For plugin owners to not interfere with existing reCAPTCHA installations on a page. If true, this reCAPTCHA instance will be part of a separate ID space.
options array [] Default input options.
widgetOptions array [] Default widget options.

You can use the application parameters in config or in bootstrap, like Yii::$app->params("recaptcha.siteKey") = "***" to store the public and private key, as well as the URL to request the API and verify. Currently, the widget and validator polls the following parameters: recaptcha.siteKey, recaptcha.apiURL, recaptcha.secretKey, recaptcha.verifyURL

This widget supports Google reCaptcha v2 in a normal and invisible way. Support for v3 is planned.

Status and version [in progress development]


All versions of yii2-recaptcha with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.0.33
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 wdmg/yii2-recaptcha contains the following files

Loading the files please wait ....