Categories: PHP

Integrate Google reCAPTCHA in your website Using PHP

How to Integrate Google reCAPTCHA in your website Using PHP

Hello, I Hope Everyone are Fine !

 These are the following steps for integrate Google Recaptcha In Your Website Form
Note:
Before add recaptcha your website you must be login with 
gmail Account(means:abc223@gmail.com) then follow these steps:

Steps:1

 Type recaptcha in Google then enter.

 

Steps:2

 Click on this link https://www.google.com/recaptcha

Steps:3

  Click on Right Corner of webpages My reCAPTCHA

Steps:4

(a) add label what you want like demo,captcha,etc..

(b) add domain name like www.basantmallick.com

for test on local server just add localhost

Steps:5

  Now accept and register.

Steps:6

  Now You see a new page where you see

Site Key and secret key

Steps:7

Here you see client side integration

just copy the Script and paste in between <head></head>

<html>
  <head>
    <title>reCAPTCHA demo: Simple page</title>
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  </head>
  <body>
    <form action="?" method="POST">
      <div class="g-recaptcha" data-sitekey="your_site_key"></div>
      <br/>
      <input type="submit" value="Submit">
    </form>
  </body>
</html>

Steps:8

 You also See  <div> section, copy them  and put before your form input submit button.

Steps:9

  You see the Server side Intergation
    Secret Key.

Steps:10

 Now open your any code editor like sublime,brackets, Netbeans, Notepad, etc..

Steps:11

 Now you just replace these key with your Secret Key in $secretkey.

Steps:12

   after submit your form successful message(Thanks for posting comment.) shows.

Another wise repeat step what I mention above Carefully.

Basant Mallick

Basant

Recent Posts

AWS

Steps: AWS puttyubuntu sudo su apt update apt install apache2 service apache2 start service apache2…

9 hours ago

How to Center submit button of wpForm

You must navigate to Settings » General first. Add wpf-center to the Form CSS Class…

8 months ago

How to add Marquee on any website wordpress,PHP,HTML,eBlogger ?

if you want to add marquee on any website (wordpress,PHP,HTML,Blogger). you just need to follow…

8 months ago

How to Autoplay and Loop YouTube Videos in WordPress

First Method: Use below code to play youtube video in loop and most important is…

1 year ago