如何在ASP Classic中验证Google Recaptcha 2.0服务器端? [英] How to validate Google Recaptcha 2.0 server side in ASP Classic?
本文介绍了如何在ASP Classic中验证Google Recaptcha 2.0服务器端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要帮助才能实现Google Recaptcha 2.0的答案。
我在发送表单后尝试了几种方法来恢复响应但是没有收到回答真实。
按照我正在尝试的例子:
< html >
< head >
< script src = https://www.google.com/recaptcha /api.js\" async 延迟 & gt; < / script >
< / head >
< body >
< 表格 操作 = teste.asp 方法 = POST >
< div class = g-recaptcha data-sitekey = 6LeDCAgTAAAAAAq4tf6729Tb7WlJivOQrazBgTBs > < / div >
< br / >
< 输入 type = 提交 值 = 提交 &g t;
< / form >
< / body >
< / html >
teste.asp:
<%
Dim recaptcha_secret,senttring,objXML
recaptcha_secret = 6LeDCAgTAAAAAAq4tf6729Tb7WlJivOQrazBgTBs
senttring = https://www.google.com/recaptcha/api/siteverify?secret=& recaptcha_secret& & response =& Request.form( g-recaptcha-response)
设置 objXML = Server.CreateObject( MSXML2.ServerXMLHTTP)
objXML.Open GET,senttring,错误
objXML.Send
Response.write < h3>响应:& objXML.responseText& < / h3>
设置 objXML = 无
%>
如何实施检查Recaptcha标记的方法?
谢谢你你注意了!
解决方案
我永远无法让任何Google Captcha工作。我终于找到了这个网站,实现起来很快。
经典ASP(VBScript)和ASP.NET(VB。 NET)安全图像(CAPTCHA)生成器 [ ^ ]
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:
<html>
<head>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
<body>
<form action="teste.asp" method="POST">
<div class="g-recaptcha" data-sitekey="6LeDCAgTAAAAAAq4tf6729Tb7WlJivOQrazBgTBs"></div>
<br/>
<input type="submit" value="Submit">
</form>
</body>
</html>
teste.asp:
<%
Dim recaptcha_secret, sendstring, objXML
recaptcha_secret = "6LeDCAgTAAAAAAq4tf6729Tb7WlJivOQrazBgTBs"
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
Response.write "<h3>Response: " & objXML.responseText & "</h3>"
Set objXML = Nothing
%>
How do I implement a way to check that Recaptcha were marked?
Thanks for yout attention!
解决方案
I could never get any of the Google Captcha's to work. I finally found this site and it was a snap to implement.
Classic ASP (VBScript) and ASP.NET (VB.NET) Security Image (CAPTCHA) Generator[^]
这篇关于如何在ASP Classic中验证Google Recaptcha 2.0服务器端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文