Captcha integration: site register with Google
Can Google's reCAPTCHA, you will need a free Google Account.
- Call in your Browser the reCAPTCHA Website and register your Website.

reCAPTCHA form
Integration of the Captcha in the Header of the site
Add the following Java script to the Header of your site:
Integration of the DIV-container
A tie the following DIV-Container where the Captcha should appear:
- You don't [forget website key] with the appropriate website key exchange.

Google's reCAPTCHA embed on your own Website
Check the Captcha response
In order to check whether the Captcha was solved correctly, is transmitted in addition to the form an additional field with the name "g-recaptcha-response". This allows you to query for example in PHP with "$_POST['g-recaptcha-response']". Finally, it must be sent to the URL "https://www.google.com/recaptcha/api/siteverify" a query with the "secret" and "response" to the answer of the Captcha to match with the Google Server. As a response you receive a JSON script, which confirms the accuracy of the Captchas or not. The return values, see the Variable "$data", which you can then process further. So the programming might look like in PHP:
- $json = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=[Secret key]&response='.$_POST['g-recaptcha-response']);
- $data = json_decode($json);
- var_dump($data);
How the Google Captcha "I'm not a robot" to work, we will show you in the next tip.
