2017 © Pedro Peláez
 

library recaptcha

Simple recaptcha class

image

zoneroot/recaptcha

Simple recaptcha class

  • Saturday, January 17, 2015
  • by zoneroot
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Recaptcha

Simple recaptcha static php class., (*1)

Installation

With composer :, (*2)

"zoneroot/recaptcha": "dev-master"

Usage

First you need to init the recaptcha with your keys :, (*3)

use \zoneroot\recaptcha\recaptcha;
recaptcha::init("public key", "private key");

Then in your head tag insert :, (*4)

echo recaptcha::script()

Next in your form tag insert :, (*5)

echo recaptcha::html()

Finally you must check if the captcha is valid :, (*6)

try {
    recaptcha::check()
    echo "Captcha is valid";
} 
catch (\zoneroot\recaptcha\exceptions\invalidRecaptchaException $e) {
    echo $e->getMessage();
}
catch (\zoneroot\recaptcha\exceptions\connectionException $e) {
    echo $e->getMessage();
}

Contributing

For contributing just follow the code style., (*7)

Todo

Add some comment, (*8)

Inspired by grafikart

The Versions

17/01 2015

dev-master

9999999-dev http://zoneroot.github.io/recaptcha/

Simple recaptcha class

  Sources   Download

GNU GPL 2.0

The Requires

  • php >=5.4.0

 

by Avatar zoneroot

captcha recaptcha