Welcome Guest, Not a member yet? Register   Sign In
Recaptcha and CI
#3

[eluser]AtlantixMedia[/eluser]
hey thanks for your prompt response. yes, I've been using recaptcha on all my websites built on "procedural coding". so I see you do not pass an error back when calling:

$recaptcha = recaptcha_get_html($publickey);

I know that argument is optional, but is there a way to get that error string back (incorrect-captcha-sol) in an OO environment as I used to do in a class-less function?

this is how I would handle recaptcha in my previous procedural projects:

Code:
//VALIDATE CAPTCHA
$resp = recaptcha_check_answer ($GLOBALS['CaptchaPrivateKey'],$_SERVER["REMOTE_ADDR"],$_POST["recaptcha_challenge_field"],$_POST["recaptcha_response_field"]);
if ($resp->is_valid) {     }
else                       {    $error = $resp->error;            $ErrCounter++;    }

thanks!

P.S.: by the way, a quick question unrelated to recaptcha: I'm trying to access a config item from within a helper file but I get a

Fatal error: Call to a member function on a non-object in.....

any ideas on how to fix this? I'm simply using $this->config->item('WebsiteTitle'); in a helper file function. thanks


Messages In This Thread
Recaptcha and CI - by El Forum - 12-16-2007, 12:10 PM
Recaptcha and CI - by El Forum - 12-16-2007, 12:23 PM
Recaptcha and CI - by El Forum - 12-16-2007, 01:01 PM
Recaptcha and CI - by El Forum - 12-16-2007, 02:31 PM
Recaptcha and CI - by El Forum - 12-16-2007, 02:44 PM
Recaptcha and CI - by El Forum - 01-13-2008, 09:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB