appleboy / codeigniter-recaptcha Goto Github PK
View Code? Open in Web Editor NEWreCAPTCHA library for CodeIgniter
Home Page: https://www.google.com/recaptcha/intro/index.html
License: BSD 3-Clause "New" or "Revised" License
reCAPTCHA library for CodeIgniter
Home Page: https://www.google.com/recaptcha/intro/index.html
License: BSD 3-Clause "New" or "Revised" License
This is not actually a bug or issue. This is a question. Is there possible ways to get multiple reCaptcha in one page?
Hello,
how to use your library with form_validation?
Thanks!
how to use reCAPTCHA V2 in localhost ?
Hi
I want to switch recaptcha on/off with settings for a template. is this possible? if yes, how?
thanks in advance
What about hadling the new invisible reCAPTCHA widget?
I'm interested in submitting forms with jQuery AJAX and assigning the "g-recaptcha" class to the async submit button.
Any help/update appreciated.
Due to my restrictions on a shared server, I am unable to run file_get_contents or even set
allow_url_fopen = on
Therefore I had to edit the library file: CodeIgniter-reCAPTCHA/libraries/Recaptcha.php
My changes aren't very clean, but could the concept be used to detect lack of support and use CURL instead?
/**
* Submits an HTTP GET to a reCAPTCHA server.
*
* @param array $data array of parameters to be sent.
*
* @return array response
*/
private function _submitHTTPGet($data)
{
$url = self::site_verify_url.'?'.http_build_query($data);
if (!ini_get('allow_url_fopen')) {
$ch = curl_init();
$options = array(CURLOPT_URL => $url,
CURLOPT_CONNECTTIMEOUT => 5,
CURLOPT_RETURNTRANSFER => true
);
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
$response = '';
} else {
curl_close($ch);
}
if (!is_string($response) || !strlen($response)) {
$response = 'Failed to get contents';
}
} else {
$response = file_get_contents($url);
}
return $response;
}
Feedback much appreciated.
Please change line #158 in /libraries/Recaptcha.php
from:
return '<div class="g-recaptcha" '.$html.'></div>';
to:
return '<div id="g-recaptcha" class="g-recaptcha" '.$html.'></div>';
to give the DIV an ID so it can be accessible VIA jQuery and/or other frameworks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.