fffffffffff
Sunday, January 9, 2011
Thursday, December 9, 2010
" & _
"src=""http://www.google.com/
recaptcha/api/challenge?k=" &
recaptcha_public_key & """>
script>" & _
""
end function
' returns "" if correct, otherwise
it returns the error response
function recaptcha_confirm
(rechallenge,reresponse)
Dim VarString
VarString = _
"privatekey=" & recaptcha_
private_key & _
"&remoteip=" &
Request.ServerVariables
("REMOTE_ADDR") & _
"&challenge=" &
rechallenge & _
"&response=" &
reresponse
Dim objXmlHttp
Set objXmlHttp =
Server.CreateObject
("Msxml2.ServerXMLHTTP")
objXmlHttp.open "POST", "http://
www.google.com/recaptcha/api/
verify", False
objXmlHttp.setRequestHeader
"Content-Type", "application/x-
www-form-urlencoded"
objXmlHttp.send VarString
Dim ResponseString
ResponseString = split
(objXmlHttp.responseText, vblf)
Set objXmlHttp = Nothing
if ResponseString(0) = "true"
then
'They answered correctly
recaptcha_confirm = ""
else
'They answered incorrectly
recaptcha_confirm =
ResponseString(1)
end if
end function
server_response = ""
newCaptcha = True
if (recaptcha_challenge_field <>
"" or recaptcha_response_field
<> "") then
server_response = recaptcha_
confirm(recaptcha_challenge_
field, recaptcha_response_field)
newCaptcha = False
end if
%>
"src=""http://www.google.com/
recaptcha/api/challenge?k=" &
recaptcha_public_key & """>
script>" & _
""
end function
' returns "" if correct, otherwise
it returns the error response
function recaptcha_confirm
(rechallenge,reresponse)
Dim VarString
VarString = _
"privatekey=" & recaptcha_
private_key & _
"&remoteip=" &
Request.ServerVariables
("REMOTE_ADDR") & _
"&challenge=" &
rechallenge & _
"&response=" &
reresponse
Dim objXmlHttp
Set objXmlHttp =
Server.CreateObject
("Msxml2.ServerXMLHTTP")
objXmlHttp.open "POST", "http://
www.google.com/recaptcha/api/
verify", False
objXmlHttp.setRequestHeader
"Content-Type", "application/x-
www-form-urlencoded"
objXmlHttp.send VarString
Dim ResponseString
ResponseString = split
(objXmlHttp.responseText, vblf)
Set objXmlHttp = Nothing
if ResponseString(0) = "true"
then
'They answered correctly
recaptcha_confirm = ""
else
'They answered incorrectly
recaptcha_confirm =
ResponseString(1)
end if
end function
server_response = ""
newCaptcha = True
if (recaptcha_challenge_field <>
"" or recaptcha_response_field
<> "") then
server_response = recaptcha_
confirm(recaptcha_challenge_
field, recaptcha_response_field)
newCaptcha = False
end if
%>
Subscribe to:
Posts (Atom)