How to Integrate Google reCAPTCHA

In this post, I would like to show you how to integrate Google reCAPTCHA. Google reCAPTCHA is more user-friendly and reliable which protects your websites form spams and robots.

What is reCAPTCHA?

If Google feels that you are not human, it will give the second prompt and it will ask you to fill the captcha. Once you verify that it lets you access the resource.

How to integrate?

Integrate Google reCAPTCHA you need followings.

  • A Gmail account. If not, please create it for you.
  • Basic Knowledge of HTML, JavaScript and also PHP

Below are the simple steps to integrate reCAPTCHA…

Step 1:
Get the API key by visit this link
google recaptcha app registration


Client-side Integration: Step 2:
Underneath these keys, there are some scripts that will be added to the client side. You can also define the language for reCaptcha.English is default language. Add the script line at footer or just below the form.

Paste this snippet before the closing tag on your HTML template:

Paste this snippet at the end of the

where you want the reCAPTCHA widget to appear:

Here – The data-sitekey is key of your own site-key which is generated by Google for you.

Step 4:

To ensure that reCAPTCHA is working properly, we will run some server-side checks. Save this file as contact.php (If you want to use different name dont fogot to update form action).

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 vote
Article Rating
Notify of
Newest Most Voted
Inline Feedbacks
View all comments
Shany Mathew
Shany Mathew
3 years ago

This post didnt help me to solve the issue? 🙁 what i do :'( getting sad

3 years ago
Reply to  Shany Mathew

Sorry about that, just updated the post. Previous version was incomplete. Protection Status
Would love your thoughts, please comment.x