davmixcool / google-recaptcha
Google Recaptcha Package For PHP front and backend.
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 0
pkg:composer/davmixcool/google-recaptcha
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2025-09-12 07:02:40 UTC
README
A PHP package which supports both back-end and front-end of Google recaptcha v2.
Requirements
- PHP 5.5 and above
Steps:
Installation
Composer
Run the following command to include this package via Composer
composer require davmixcool/google-recaptcha
Usage
Simple to use.
use Davmixcool\GoogleRecaptcha; //include the recaptcha configurations globally $googleRecaptcha = new GoogleRecaptcha([ 'secret_key' => 'Your secret key', 'site_key' => 'Your site key', 'theme' => 'light' ]); //Place the renderJs before the closing body tag. $googleRecaptcha->renderJs(); //Place the renderCaptcha where you want to display the captcha. $googleRecaptcha->renderCaptcha(); // Check if captcha was passed successfully if ($googleRecaptcha->check()) { // Perform success action } else { // Throw an error if catcha was not solved successfully }
Maintainers
This package is maintained by David Oti and you!
License
This package is licensed under the MIT license.