我不知道如何在控制器form.php中调用,并使用秘密密钥设置url,我有文件form_view.php,其中粘贴google代码片段:
<div class="g-recaptcha" data-sitekey="my_site_key"></div>
然后,在controllers/form.php中,我验证表单,并像下面这样调用google recaptcha
$this->form_validation->set_rules('g-recaptcha', 'Google Captcha', 'trim|required|xss_clean|callback_checkCaptcha');
结果是,如果我检查或取消选中google result,消息是相同的:
阵列Google需要,但它从CodeIgniter加载Captcha,但没有从google加载captcha。
谢谢你们的帮助
发布于 2015-04-16 17:44:52
您可以使用这个库代码https://github.com/Cnordbo/RECaptcha-for-Codeigniter (函数已经准备好使用),您只需要google在本页https://www.google.com/recaptcha/intro/index.html中提供的密匙和公钥。
https://stackoverflow.com/questions/29659801
复制相似问题