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

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..
My Blogs - https://code-sample.com and https://code-sample.xyz
My Book1 - BEST SELLING ANGULAR BOOK (INCLUDING ALL VERSIONS 2, 4, 5, 6, 7)
My Book2 - ANGULAR 2 INTERVIEW QUESTIONS BOOK - Both Books are Available on WorldWide.

www.code-sample.com/. Powered by Blogger.