<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Recaptcha Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</script>
</head>
<%
Dim action, reresponse, recaptchagood
action = Request.Form("Action")
If action ="Go" then
reresponse= Request.form("g-recaptcha-response")
Dim VarString
VarString = _
"?secret=yoursecretkey" & _
"&response=" & reresponse & _
"&remoteip=" & Request.ServerVariables("REMOTE_ADDR")
Dim url
Dim objXmlHttp
Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objXmlHttp.open "POST", url, False
objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXmlHttp.send
Dim ResponseString
ResponseString = objXmlHttp.responseText
Response.Write(ResponseString)
Set objXmlHttp = Nothing
If instr(ResponseString, "success" & chr(34) &": true")>0 then
recaptchagood="Yes"
{actions here for success}
else
{actions here for fail}
end if
End if
%>
<form action="recaptchatest.asp?" method="POST">
<div class="g-recaptcha" data-sitekey="yoursitekey"></div>
<br/>
<input type="hidden" name="Action" value="Go">
<input type="submit" value="Submit">
</form>
</body>
</html>