Coder Social home page Coder Social logo

recaptcha-plugin's Introduction

CakePHP 2 ReCaptcha Plugin based on CakepPHP 1 tbsmcd's plugin.


Quick start guide


  1. Get reCAPTCHA key. http://www.google.com/recaptcha

  2. Setting. Download recaptchalib.php. And put it in recaptcha_plugin/vendors. http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest

  3. Config. Insert keys in Recaptcha/Config/key.php . $config = array( 'Recaptcha' => array( 'Public' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'Private' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ), );

  4. Bootstrap if you load your plugins one by one add CakePlugin::load('Recaptcha');

ReCaptcha/Config/bootstrap.php only reads your key.php config file

  1. Controller. public $components = array('Recaptcha.Recaptcha'); public $helpers = array('Recaptcha.Recaptcha');

    or inside controller action

    $this->helpers[] = 'Recaptcha.Recaptcha'; $this->Components->load('Recaptcha.Recaptcha')->startup($this);

    always add in your controller action or in bootstrap Configure::load('Recaptcha.key');

  2. View. Inside

    tags: echo $this->Recaptcha->show(array $options); $options : any recaptcha supported option (theme, lang, custom_translations, custom_theme_widget, tabindex) example: echo $this->Recaptcha->show(array( 'theme' => 'light', 'lang' => 'en', ));

    echo $this->Recaptcha->error();

recaptcha-plugin's People

Contributors

avapps avatar hrishikesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

recaptcha-plugin's Issues

problem with recaptcha response field

Hi.
I'm new to cakephp. i tried out this recaptcha plugin on localhost. everything works fine, recaptcha is getting displayed but every response i send in the input field is showing as incorrect answer. (even though i typed it correctly many times)

I was using the plugin on register action. I was starting a new session when user lands into register page. Is that the issue or it might be anything else? Please help me out on this one

reCaptcha always returns the message of the model

No matter what I enter in the captcha, it never gets verified and I always receive the 'message' field of beforeValidate (I've set it to "You've entered a wrong message" etc).
I'm not even sure how to debug it to see at which point it fails. Even if I just replace all the code in checkRecaptcha with "return true" it still remains the same, and I'm generally not getting any of the specific "incorrect-captcha-sol" messages that I read around.

Any insight?

Recaptcha accepts any input

Hi There

First of all, awesome plugin, It worked perfectly under my localhost.
The thing is, when i tried it on my server, it doesn't work
It accepts any input the users gave and this is using the same code i used for my localhost.
Also, i already tried several keys and of course, with the enable global domain so i'm 100% sure it's not my error
Anyone can help me with this issue?

Getting "To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create" Error

Hi Please help,

The plugin is really very good. I would like to test reCAPTCHA in localhost, but it is displaying the following error:

"To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"

but i have register for reCAPTCHA and got Public and Private key for my site. My understanding is it should work in the localhost too.

My cakephp index.php is in the path "wamp\www\Cakephp". while accessing the register page for my site from local the url is "http://localhost/Cakephp/Users/add".

Am I missing anything.. Please help.

I m new to Cakephp. Thanks in advance!!!!

Folder repo

Hey,

By using a folder in your repo you are preventing people from being able to submodule your repo. As it needs to be checked out into a folder, so, like me you'll end up with app/Plugin/Recaptcha/Recaptcha/ which then throws a missing component error, because there is an extra folder.

Please consider moving your code up a folder and removing the redundant /recaptcha folder.

Ta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.