tyrola / recaptcha
A properly coded PHP 5 reCaptcha class that will allow you to interact with Google's reCaptcha API v2.
Installs: 16 051
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 28
Open Issues: 0
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2020-08-21 18:52:28 UTC
README
A properly coded PHP 5 reCaptcha class that will allow you to interact with Google's reCaptcha API v2.
- 100% phpDocumentator 2 code coverage
- 100% PSR-2 code coverage
- Composer friendly package
Feel free to extend and modify it to fit your frameworks / applications needs.
Usage
Composer install
You can install via composer:
- visit http://getcomposer.org to install composer on your system;
- create a composer.json file in your project root:
{
"require": {
"tyrola/recaptcha": "v2.1.0"
}
}
- download and install the package with
composer install
; - add this line to your application's
index.php
file:
<?php require 'vendor/autoload.php';
Manual install
If you have your own autoloader, simply update namespaces and drop the files into your frameworks library.
Please see Examples directory for a simple run down of functionality.
Notes
- The functionality is based on $_POST requests by default, you can modify it (fairly easy) to take $_GET or whatever you want instead.
- It will always send remote address from $_SERVER['REMOTE_ADDR'] variable if you are behind Vagrant/etc, please update it (or write a setter to set remote address on the fly :))