需要有关 reCAPTCHA api 的发布请求部分的帮助
我对 POST 请求或 api 几乎一无所知,所以你可以做得越明确越好。
我正在查看向我的网站添加 reCAPTCHA 的说明,但我陷入了验证部分。这是我坚持的部分: http://code.google.com/ apis/recaptcha/docs/verify.html
我不知道如何执行 POST 请求。如果有人可以向我解释这一部分,那将会有很大帮助。
这是我目前在网站上的代码,直接从 http:// /code.google.com/apis/recaptcha/docs/display.html#Standard:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<body>
<!-- ... your HTML content ... --> <form action="" method="post"> <!-- ... your form code here ... --> <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=public key"> </script> <noscript> <iframe src="http://www.google.com/recaptcha/api/noscript?k=public key" height="300" width="500" frameborder="0"></iframe><br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript> <!-- ... more of your form code here ... --> </form> <!-- ... more of your HTML content ... -->
</body>
</html>
I hardly know anything about POST request or api's , so the more explicity you can make things, the better.
I'm going through the description of adding a reCAPTCHA to my site but I'm stuck on the verification portion. Here's the part I'm stuck on: http://code.google.com/apis/recaptcha/docs/verify.html
I don't know how to do a POST request. If someone could explain this portion to me that would help greatly.
Here's the code I have on my site so far, copied directly from http://code.google.com/apis/recaptcha/docs/display.html#Standard:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<body>
<!-- ... your HTML content ... --> <form action="" method="post"> <!-- ... your form code here ... --> <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=public key"> </script> <noscript> <iframe src="http://www.google.com/recaptcha/api/noscript?k=public key" height="300" width="500" frameborder="0"></iframe><br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript> <!-- ... more of your form code here ... --> </form> <!-- ... more of your HTML content ... -->
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要么使用 recaptcha PHP/Perl/Asp/.. 插件,要么使用 recaptcha ajax 库,它使用 javascript 处理所有内容,因此您不需要服务器端脚本。
either use te recaptcha PHP/Perl/Asp/.. plugin or use the recaptcha ajax library which handles everything with javascript so you dont need server side scripts.