I need help to implement the answer Google Recaptcha 2.0.
I've tried a few ways to recover the response after sending the form but not consigui get the answer True.
Follows the example I'm trying:
recaptcha_secret = "example45454sasa"
sendstring = _
"https://www.google.com/recaptcha/api/siteverify?" & _
"secret=" & recaptcha_secret & _
"&response=" & request.form("g-recaptcha-response")
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
objXML.Open "GET", sendstring , false
objXML.Send()
if instr(objXML.responseText,"true") then
response.write "yes"
else
response.write "no"
end if
Second exmeplae wehre I using aspJSON1.17.asp library:
recaptcha_secret = "example45454sasa"
Set oJSON = New aspJSON
jsonstring = "https://www.google.com/recaptcha/api/siteverify?secret=" & recaptcha_secret & "&response=" & request.form("g-recaptcha-response") & ""
'Load JSON string
oJSON.loadJSON("" & jsonstring & "")
'Get single value
Response.Write oJSON.data("success") & ""
The two examples above return False or No.
How do I implement a way to check that Recaptcha were marked?
Thanks for yout attention!
In the case of Zam as in my example the response that appears on the screen is:
Response: { "success": false, "error-codes": [ "invalid-input-secret" ] }
I believe it should appear "True" since I am answering the question correctly.
You can test: bit.ly/1R1cbEs
I don't see how you send request.
Anyway, below is working sample with my site key for test web site. Of course, you should provide your own "secret key" and "data-sitekey"
Live sample: http://1click.lv/googlecaptcha.asp
File name: GoogleCaptcha.asp