Tweet, Share & Like [ EnAcCiOn ]

 

FeedBurner FeedCount Y Facebook | EnAcCiOn

Send Voicemail | EnAcCiOn

Contact me using vCita | EnAcCiOn

Contact me using vCita | EnAcCiOn

Meeting Scheduler Powered by vCita

lunes, 13 de julio de 2015

Re: Recaptcha V2 hopefully made simple. Both HTML and PHP code included here

I looked on the web and I think I have a working test. Since $response is a JSON object, it should be decoded to an associative array, and then the appropriate element of the array should be tested. So we need, first,      $response = json_decode($response, true);and then the test should be      if($response['success'])With those changes, I got "You have been identified as a robot" when the secret key was wrong, and "Thanks for getting it right" after I restored the correct secret key.I'm waiting for somebody else to verify that this code is OK before I use it. Meanwhile I'm still using V1.BTW I got a new key pair for V2, different from the pair I was using for V1. I have a vague recollection that I tried the same code before, but using the same key pair as for V1, and it always tested false. If so, you need a new key pair for V2. But I could be mistaken.On Monday, July 13, 2015 at 9:14:24 PM UTC-4, Martin Brilliant wrote: How carefully did you test this code? I added some debugging statements, and then tested it by altering the secret key. The debugging showed false, but the test always succeeded. So, meanwhile, I'm still using V1.Here is my code (after getting the POST parameters and the $response to the file_get_contents statement):

No hay comentarios:

EnAcCiOn

Contador Web | EnAcCiOn

EnAcCiOn

EnAcCiOn

EnAcCiOn

Blog Archive | EnAcCiOn