Getting reCAPTCHA error messages (more than just the error code)

Status
Not open for further replies.
K

Kryptic Sliver

Guest
I'm trying to implement reCAPTCHA on a couple sites without using any of the plugins. The thing is is that mine processes a bit different because of my back end code. Because I'm using Progress OpenEdge, I need to use a cURL request to verify the reCAPTCHA. I get my response the first time with the response going to a file which ends up looking like this: falseincorrect-captcha-sol

Reading the docs on reCAPTCHA, I saw that you can add &error=errorcode to the url.

Now how exactly does this work? Is adding the error param supposed to output an actual message for the error code? Or just automatically return the error code?

So here's how I have my code essentially. I make the cURL call:

--url http://www.google.com/recaptcha/api/verify -d "privatekey=key&remoteip=ip&challenge=chall&response=dghdghdfg" -o "/path/recaptcha-log.txt"

I read in the file to get parse the error code from the result(false), then I redo the cURL request with the error param:

--url http://www.google.com/recaptcha/api/verify -d "privatekey=key&remoteip=ip&challenge=chall&response=dghdghdfg&error=incorrect-captcha-sol" -o "/path/recaptcha-log.txt"

However, my file just ends the same. What is the error param supposed to do?

Please note that I use a proper privateKey/IP/challenge/file path, but I removed them for privacy.

Continue reading...
 
Status
Not open for further replies.
Top