To use reCAPTCHA you must get an API key

1,987 views
Skip to first unread message

Horvath

unread,
Feb 1, 2012, 7:00:57 PM2/1/12
to reCAPTCHA
To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create

I have done this 12 times.. followed the instructions, 100%

Added the code in my PHP form, with the public key

Added the Code and private key to my form action php file.

and I added my private and public key to my recaptchalib.php file..

and I still get the same error:

To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create

any thoughts?

Besides try something else?

Thanks

Adrian Godong

unread,
Feb 1, 2012, 7:25:03 PM2/1/12
to reca...@googlegroups.com
Page URL?

> --
> You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> To post to this group, send email to reca...@googlegroups.com.
> To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.
>

--
Adrian Godong
adrian...@gmail.com

Jim

unread,
Feb 2, 2012, 6:17:31 PM2/2/12
to reCAPTCHA
I too am experiencing this problem. Here's my page (almost done,
except for this reCAPTCHA):

http://dev.livelycaking.com/uif/register.php


On Feb 1, 6:25 pm, Adrian Godong <adrian.god...@gmail.com> wrote:
> Page URL?
>
>
>
>
>
>
>
>
>
> On Wed, Feb 1, 2012 at 16:00, Horvath <eadjut...@gmail.com> wrote:
> > To use reCAPTCHA you must get an API key fromhttps://www.google.com/recaptcha/admin/create
>
> > I have done this 12 times.. followed the instructions, 100%
>
> > Added the code in my PHP form, with the public key
>
> > Added the Code and private key to my form action php file.
>
> > and I added my private and public key to my recaptchalib.php file..
>
> > and I still get the same error:
>
> >  To use reCAPTCHA you must get an API key fromhttps://www.google.com/recaptcha/admin/create
>
> > any thoughts?
>
> > Besides try something else?
>
> > Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> > To post to this group, send email to reca...@googlegroups.com.
> > To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/recaptcha?hl=en.
>
> --
> Adrian Godong
> adrian.god...@gmail.com

PJH

unread,
Feb 2, 2012, 6:27:08 PM2/2/12
to reca...@googlegroups.com
On Thu, Feb 2, 2012 at 11:17 PM, Jim <j...@jimfell.net> wrote:
> I too am experiencing this problem.  Here's my page (almost done,
> except for this reCAPTCHA):
>
> http://dev.livelycaking.com/uif/register.php

The reCAPTCHA looks fine to me, however your verification script seems
to have a problem:

Catchable fatal error: Object of class CRegister could not be
converted to string in
/home/therealhopeful/dev.livelycaking.com/uif/register.php on line 196

--
PJH

Jim

unread,
Feb 2, 2012, 6:33:20 PM2/2/12
to reCAPTCHA
I fixed that. Please try again.

PJH

unread,
Feb 2, 2012, 6:41:08 PM2/2/12
to reca...@googlegroups.com
Hmm. Did you register livelycaking.com at
https://www.google.com/recaptcha/admin/list, or some other variation
of it?

Can you post the code around the verification from register.php?

> --
> You received this message because you are subscribed to the Google Groups "reCAPTCHA" group.
> To post to this group, send email to reca...@googlegroups.com.
> To unsubscribe from this group, send email to recaptcha+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/recaptcha?hl=en.
>

--
PJH

Horvath

unread,
Feb 2, 2012, 8:56:20 PM2/2/12
to reCAPTCHA
Yeah Its crazy, I keep getting the same error, no matter what I try

On Feb 2, 6:41 pm, PJH <pauljherr...@gmail.com> wrote:
> Hmm. Did you register livelycaking.com athttps://www.google.com/recaptcha/admin/list, or some other variation

Jim

unread,
Feb 3, 2012, 3:43:29 PM2/3/12
to reCAPTCHA
The form is generated using PHP. The reCAPTCHA code is in a wrapper
class. Here's the code for the verification function, which gets
called when processing the form data:

public function ValidAnswer()
{
try
{
$resp = recaptcha_check_answer(
$private_key,
$_SERVER['REMOTE_ADDR'],
$_POST['recaptcha_challenge_field'],
$_POST['recaptcha_response_field'] );
}
catch ( Exception $e )
{
throw new Exception( "Failed to validate user answer for
reCAPTCHA.", CError::CAPTCHA, $e );
}

return $resp->is_valid;
}

If you want to see the complete code (minus the keys of course), I've
put it up on pastebin:

http://pastebin.com/Tkhai0eZ
http://pastebin.com/EHGVfw3Z


On Feb 2, 5:41 pm, PJH <pauljherr...@gmail.com> wrote:
> Hmm. Did you register livelycaking.com athttps://www.google.com/recaptcha/admin/list, or some other variation
Reply all
Reply to author
Forward
0 new messages