Google reCaptcha

is let you integrate captcha in your website’s form to protect your site from spammers and automatic abuses. Its quite user friendly as it doesn’t verify human by using traditional method of verifying text displayed in image. User just need to select correct images from grid which is answer of question. If user has already logged in google account then there is no need of verification process. Here is step by step tutorial to add recaptcha in your page.

Google ReCaptcha

Step-1 Create reCaptcha application

First of all you need to create application and register our website in google console.
Click on google reCaptcha and click on “Get reCaptcha”. Now, login with google account. Add application name and add site(s) you want to use reCaptcha and . It also allows multiple domains. After entering all details, Now, note site key and Google secret key. It will need later in implementation.

Step-2 Create HTML form

index.html
It contains simple HTML form wtih google reCaptcha snippet. Here, we have create contact us form.

In above code, Replace “Google Site Key” with your site key.
contactus.php
Will check captcha you have entered is valid or not. If captcha is valid then it will send email to perticular email address. Replace “To email address” with your email address. Here you need to Enable php_curl extensation in php.ini file.How to enable curl in php

  1. I have just found your blog, and I’m in love with your writing skills. I decided to comment to this post because it really helped me out. Keep up the good work

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">