Download the PHP package holduix/recaptcha without Composer
On this page you can find all versions of the php package holduix/recaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download holduix/recaptcha
More information about holduix/recaptcha
Files in holduix/recaptcha
Package recaptcha
Short Description Google reCAPTCHA integration for PHP (supports v2 and v3)
License GPL-2.0-only
Homepage https://github.com/holsonmp/recaptcha
Informations about the package recaptcha
reCAPTCHA
This PHP package allows you to easily integrate Google reCAPTCHA (v2 and v3) into your projects. It supports the basic features of reCAPTCHA v2 (checkbox and invisible) as well as the new features of reCAPTCHA v3 (score-based).
- Installation
- Initialization
- Usage
- reCAPTCHA v2
- reCAPTCHA v3
- Customization
- Theme
- Language
- Type
- Size
- Score Threshold (v3 only)
- Full Examples
- reCAPTCHA v2 Example
- reCAPTCHA v3 Example
Installation
With Composer, add this line to the require section of your composer.json
file:
Then run the following command:
or
Initialization
To initialize reCAPTCHA, you need to provide your public key (site key) and your secret key (secret key). You can do this in two ways:
Method 1: Directly in the builder
Method 2: Via separate methods
Usage
reCAPTCHA v2
reCAPTCHA v2 is the classic version that displays an invisible checkbox or captcha. Here's how to use it:
Generate the script
Generate HTML block
Server-side validation
reCAPTCHA v3
reCAPTCHA v3 works without user interaction and returns a score between 0.0 and 1.0. Here's how to use it:
Generate the script
Generate hidden field
Server-side validation
Customization
Theme
Several themes are available for reCAPTCHA v2: light
(default) or dark
.
Language
You can change the language of reCAPTCHA. By default, the language is automatically detected.
Type
For reCAPTCHA v2 you can choose between image
(default) or audio
.
Size
For reCAPTCHA v2 you can choose between normal
(default) or compact
.
Score Threshold (v3 only)
For reCAPTCHA v3, you can set a score threshold (between 0.0 and 1.0). By default, the threshold is set to 0.5.
Full Examples
reCAPTCHA v2 Example
reCAPTCHA v3 Example
All versions of recaptcha with dependencies
ext-curl Version *
ext-json Version *