Google New reCaptcha using PHP – Are you a Robot?

For the past several years, Google’s reCAPTCHA has verified a user’s humanity by forcing you to decipher warped, nonsensical text. reCAPTCHA protects the websites you love from spam and abuse.

Recently Google introduced a simplified “captcha” verification system (video) that enables users to pass the “captcha” just by clicking on it. This API utilizes an Advanced Risk Analysis engine that is capable of discerning between users and bots. The best part is that the interface has been simplified to a checkbox, a vast improvement over reCAPTCHA’s alphabet soup scramble.

Implement Google Repaptcha

reCaptcha

However, CAPTCHAs aren’t going away just yet. In cases when the risk analysis engine can’t confidently predict whether a user is a human or an abusive agent, it will prompt a CAPTCHA to elicit more cues, increasing the number of security checkpoints to confirm the user is valid.

 

In this post We had implemented new reCaptcha API system with HTML login form using PHP. We hope you will like it. Please take a look on the steps of implementing new reCaptcha API:

New reCaptcha using PHP

1. Get reCaptcha Key

Create a Google reCaptcha application by clicking here

2. Register Your Website

register for google recaptcha

3. Google Site Key :

You will use this in HTML code.

site key

4. Google Secret Key

Key for communicating between your website and Google. secret key

5. Implementation

clientside integration

Integration: Click for large preview

Now implement Google’s Captcha JS in html as follows :

HTML Code

It is a simple HTML Form code with Google reCaptcha implementation. Here you have to modify the Google Site Key value (data-sitekey) which you got from Google as specified prior.

HTML Form

PHP Code

In this PHP code, we have to modify the Google Secret Key and we are using CURL, so Enable php_curl extension in php.ini configuration file. You can check CURL enable by printing phpinfo() which outputs of PHP configuration.

Now check the form and verify Google New reCaptcha using PHP is working as desired and rest assure the visitor filled the form, is not a robot.

You Might Interested In

1 COMMENT

Leave a Reply

Enclose a code block like: <pre><code>Your Code Snippet</code></pre>.