Wednesday 23 July 2014

How to enable a ReCaptcha for both HTTP / HTTPS (SSL enabled domain)

Please use the blow code to enable the Google ReCaptcha for HTTP & SSL enabled domain (i.e. HTTPS URL).
In fact, it will work for both types;
// Works only for HTTP - Get reCAPTCHA JS/HTML Code
$html = recaptcha_get_html($this->config->item('recaptcha_public_key', 'tank_auth'));

// Works for both HTTP / HTTPS - Get reCAPTCHA JS/HTML Code
$html = recaptcha_get_html($this->config->item('recaptcha_public_key', 'tank_auth'), null, true); // just added ", null, true" for ssl
The above code is snapshot of CodeIgniter (CI) based project.

No comments:

Post a Comment

Please post any queries and comments here.