وبسایت آموزش برنامه نویسی

How to use Google reCaptcha with Cakephp 3.x

To use google reCaptcha with php you can read How to use google recaptcha with PHP .
In this tutorial we learn how to use google recaptcha with cakepphp 3.x we need two keys that provide by google .you can get your recaptcha keys from google developer account.

۱٫first we need to call google recaptcha js so open your projectFolder/src/template/layout/default.ctp or you can call it into your header.ctp

<?= $this->Html->script(‘https://www.google.com/recaptcha/api.js’) ?>

۲٫ Now we have to save keys into our project that we can access from anywhere so copy this code and paste it into YourProject/Config/bootstrap.php