In many cases, we want to identify where the form request raised by human, robots or spammers. For a secure application, we need to identify form request raised by human only. To enable this Google reCaptcha API to help us to do this checking process.

Now Google has been offered new reCaptcha API called Are you a robot? label input reCaptcha an entirely new idea captcha scheme. With the help of reCAPTCHA users can prove they are human without answering a CAPTCHA. Users need just do one click to verify they are not a robot. Using reCAPTCHA will protect our website from spammers or robots with better user performance. Google reCAPTCHA is very easy to integrate into a PHP script.

Step 1: Include required javascript and add the reCAPTCHA div tag on our web page.

Include the required API js link with proper reCaptcha placement tag information. It will help to generate and display the reCaptcha on our page.

Step 2: Add the HTML form with relevant fields and reCAPTCHA tag.
Step 3: PHP Script

Just add the write PHP script to validate the reCAPTCHA validation and get the response with JSON format and decode and store it a variable to use it in our application.

Download   Demo

Leave a Reply

Your email address will not be published. Required fields are marked *