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

How to make dependent dropdown of state and district using cakephp2 form?

Creating dependent dropdowns in CakePHP 2 involves using AJAX to dynamically load data into the…

19 hours ago

How to make id as auto increment in postgrey SQL?

just add below code in column properties id Default input Method: 1nextval('form_submissions_id_seq'::regclass) Method: 2 Via…

21 hours ago

How to Add Auto Increment to a Column in PostgreSQL ?

Learn how to efficiently set up auto-increment columns in PostgreSQL with this step-by-step guide. From…

1 month ago