I am trying to add google's reCAPTCHA in my CakePHP application's login and registration pages. But it showing following error:
Fatal Error
Error: Call to undefined function recaptcha_check_answer()
File: C:...\app\Controller\UsersController.php
in the UsersController , i have following line which is indicated in the error message.
$recaptchaResp = recaptcha_check_answer(Configure::read("Recaptcha.privateKey"),
$_SERVER["REMOTE_ADDR"],
$this->params['form']["recaptcha_challenge_field"],
$this->params['form']["recaptcha_response_field"]);
Could anyone tell me please what 's wrong in this code ? is it missing any file like recaptchalib ? if so, where can i get this library for CakePHP 2.5.1 ?
require_once('recaptchalib.php');or equivalent; writing an app with CakePHP doesn't fundamentally change that your app is written in ... PHP. - AD7six