Captcha code is one of the best and easy way to protect your online form from automated abuse and spam. But writing code to create captcha is not easy. It take some time to make captcha code for website and also if you want to add some extra functionality to your captcha like add voice/sound to your captcha it really take allot of time and we don’t want to waste or time to make this. Google help us to solve it google provide free captcha services for your website Named as Google reCatcha.

Google recaptcha - trinity tuts

Demo

Google reCaptcha is very easy to use you need to add reCaptcha library to your project download the google reCaptcha from here after download you need to create your public and private key to use google recaptcha you need to login to your google account and then go to this link https://www.google.com/recaptcha

google recaptcha

Now add your site link where you want to add google recaptcha widget as shown in above image.

google recaptcha key

after adding your site and you get your public and private key as shown in above image.

Code to call google widget to form:

code to verify captcha

As in above code you need to add your public key to get google recaptcha to your website. And at next page where you verify your captcha code you need to enter your private key to work this captcha and to function

after this we check that user add correct captcha code or not using “$proccessVar->is_valid”
This is the simple way to integrate the google recaptcha to your web forms.

Happy Coading!.

One thought on “Add Google reCaptcha to your web form”

  1. How to get the item at specific position from the Spinner
    like myspinner.getItemAtPostion(myposition) ?..
    Help me Out?.

Comments are closed.