STEP 1 REGISTER WITH GOOGLE & GET THE KEYS For the captcha, we will be using a free service by good old Google – Google reCAPTCHA. So the first step is to sign up and register your website. Go to the, and register your website. Please do take note that if you want to test the captcha on your local machine, you have to add localhost and/or 127.0.0.1 into the domains list. When you are done with the registration, Google will throw you a bunch of keys and code fragments. We will be using these later, and don’t worry, they are actually very straightforward. You don’t have to copy them down on a piece of paper for now, you can always check back in the admin panel to get all the keys. 😆.
![With With](http://www.vasplus.info/tutorials_attachments/captcha_script_using_php.gif)
Create contact forms in HTML that work. A contact form is a must if you want to hear from visitors. Facebook pages and email newsletters are two key places to use contact forms.Here, we show you how to generate code for an HTML contact form, including a PHP script that will send form responses to you. The recaptcha_check_answer function. After the user has filled out the HTML form, including their answer for the CAPTCHA, we want to check their answer when they submit the form using the recaptcha_check_answer function.
Form.html
Place the reCAPTCHA div wherever in the form that you want to display the captcha. That’s it, you now have a fully functioning form with captcha. Form-ajax.html
Many of you asked for a tutorial on implementing a Captcha to the Bootstrap forms, here it is. I chose a popular Captcha solution, Google's ReCaptcha, for the verification. In the tutorial, I will be using from my previous tutorial. Our form will be using HTML5 sprinkled with some Bootstrap scaffolding and a JavaScript validator. We will submit it via AJAX (the page will not reload) and process the form values with PHP.
At last, we will send an email with PHP and return a response to the original page that will be shown in a status message above the form. I will mostly focus on working with Captcha today, so in case you have missed my last tutorial, have at least.