Google introduce new reCaptcha technology through which we prevent site from roboot and most important feature we don’t need to enter captcha code you need to check the book and google automatic detect that you are human or roboot. In this post i explain you how to implement google reCaptcha in your website using php.




Step 1. Login to your Google account or create new google account. Then go to reCaptcha admin area.

Step 2. Now register your site for reCaptcha.

 Step 3.  After register your site on google reCaptcha get your site key and security key. We need them for implementation of google reCaptcha in our site.

Client side

In html page we need to add google javascript file :

and add this div where you want to load captcha

 Server Side

At server side first get the captcha code from form then we need to verify captcha by sending data to google server to validate i am using PHP so i use CURL  to do that and get JSON response from google server


PHP Code

Complete Code: