Google reCAPTCHA is a free reCAPTCHA tool to prevent your web forms from any kind of spam bot or abuse. We have developed a library in PHP to integrate Google reCAPTCHA in PHP with example.
To demonstrate the Google reCAPTCHA service, we have created a contact form and added Google reCAPTCHA checkbox. When any user checks the checkbox then our library calls the Google reCAPTCHA API and validate the user. If the Google reCAPTCHA API returns success then you can proceed with forms input.
You can see complete tutorial with step to step explanation to integrate Google reCAPTCHA in PHP.
We have created a live DEMO of Google reCAPTCHA in PHP to get more understanding. You can see the demo here.
Generate the Secret Key & Site Key from Google reCAPCTHA admin console.
- You can directly download the ZIP file from here and extract it in your application.
- Replace the below placeholder with your generated key
- Run the application in your server.