Google Recaptcha

Google Captcha or Recaptcha, How to use the “I'm not a Robot”?

Step 1 : In the first step, we need to prepare  API  key for your site/domain where you want to implement Google recaptcha “I'm not aRobot”.

Go to link (https://www.google.com/recaptcha/admin)for create API  key and see below instruction. i.e.


Step 2 :  In the second step, get site key and secret key for display Google recaptcha. i.e.


Step 3 : Please use the api.js and data-sitekey for recaptcha. i.e.

JavaScript API URL code

<script src='https://www.google.com/recaptcha/api.js'></script>

HTML code

<div class="g-recaptcha" data-sitekey="6Ldbdg0TAAAAAI7KAf72Q6uagbWzWecTeBWmrCpJ"></div>



Step 4 :  The example in detail about Google Recaptcha, How to use the “I'm not a Robot”? as given below.

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Google Recaptcha, How to use the “I'm not a Robot”</title>
    <script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
    <form action="" method="post">
        <h1>Google Recaptcha, How to use the “I'm not a Robot”</h1>
        <div>
            <label for="name">Name:</label>
            <input name="name" required>
        </div>
        <div>
            <label for="email">Email:</label>
            <input name="email" type="email" required><br />
        </div>
        <div>
            <label for="phone">Phone:</label>
            <input name="phone" type="phone" required><br />
        </div>
        <div class="g-recaptcha" data-sitekey="6Ldbdg0TAAAAAI7KAf72Q6uagbWzWecTeBWmrCpJ"></div>
        <input type="submit" value="Submit" class="fb9" />
    </form>
</body>
</html>

The live output,

ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book