Skip to content

poznet/ReCaptchaLibrary

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google ReCAPTCHA ver.2 backend provider

SensioLabsInsight Latest Stable Version Build Status Scrutinizer Code Quality Coverage Status License

You can find full documentation about Google reCAPTCHA API v2 here.

Installation

You can install this package with Composer. Add next lines to your composer.json file:

{
    "require": {
        "dario_swain/re-captcha-library": "1.0.*"
    }
}

Usage Example

Use ReCaptcha class for sending request to google API:

<?php

    $privateKey = 'PRIVATE_KEY'; //You Google API private key
    $clientIp = $_SERVER['REMOTE_ADDR']; //Client IP Address
    $gReCaptchaResponse = $_POST['g-recaptcha-response']; //Google reCAPTCHA response

    $reCaptcha = new ReCaptcha($privateKey, $clientIp, $gReCaptchaResponse);
	$response = $reCaptcha->buildRequest()->send();

	if($response->isSuccess())
    {
        //Submit form ...
    }

Copyright

Copyright (c) 2015 Ilya Pokamestov dario_swain@yahoo.com.

About

Google ReCAPTCHA (ver. 2) backend provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%