CAPTCHA
NAME
captcha - Show how to use a captcha within Extenso
DESCRIPTION
How to use Google's ReCaptcha.
PREREQUISITES
Go to https://www.google.com/recaptcha/
Register a new site labeled with the project name,
In the domains, set domain names related to the website, including sednove.ca and sednove.com which will also include subdomains for staging, etc.
Click Register.
You will get two keys.
Put the Site key in the Front-end replacing the 00000000....
Put the Secret key in the back-end.
In the Owners, add google@sednove.com
FRONT-END
<!-- ReCaptcha -->
<div class="field-row">
<script src='https://www.google.com/recaptcha/api.js?hl='></script>
<div class="g-recaptcha" data-sitekey="000000000000000000000000000000000000000"></div>
</div>
BACK-END
// ReCaptcha
google_recaptcha_secret = "000000000000000000000000000000000000000";
captcha_check = curl(
url: 'https://www.google.com/recaptcha/api/siteverify',
data:"secret=" .+ google_recaptcha_secret .+ '&response=' .+ cgidata{'g-recaptcha-response'}
);
google_check_data = unstringnify(captcha_check.body);
// google_check_data.success
AUTHOR
Written by Olivier St-Laurent, <olivier@sednove.com>
Edit