Skip to main content

Posts

Showing posts with the label Google Captcha in cakephp

How To Add Google Captcha in Cakephp

Step 1: First you should do is sign up and register you domain for private and public key. Step 2 : Then download reCAPTCHA PHP library and put recaptchalib.php file on recaptchalib folder on verdors folder like vendors. Step 3 : Put this file in bootstrap.php   pp/config/bootstrap.php //--------------for google captcha start here------------//   Configure::write('recatpch_settings', array(    'public_key'=>'6Lf-nu8SAAAAAIGBhxpcJGxqI03LSP1vcNtjYGrN ', 'private_key'=>'6Lf-nu8SAAAAAC7tXfYaZi0GDKvD5aa7JO7CNXkB '   )); //-----------end here-----------------------------------// Step 4:  Add this to your ctp Now you have to add script where you have want to add captcha in ctp <?php echo $this->Html->script('https://www.google.com/recaptcha/api/js/recaptcha_ajax.js');?> <scri...