【发布时间】:2016-10-09 01:16:55
【问题描述】:
我正在将来自 google 的 reCaptcha 添加到我的表单中。问题是即使我遵循了谷歌的指示。我仍然可以在不进行重新验证的情况下按下提交按钮。任何想法请继承相关代码sn-ps。
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>webpage title</title>
<link rel="stylesheet" type="text/css" href="view.css" media="all">
<script type="text/javascript" src="view.js"></script>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
以及网页表单部分中的这个sn-p
<div class="g-recaptcha" data-sitekey="xxxxxxmyapikeyxxxxxxx_xxxxxxmyapikeyxxxxxxx"></div>
<li class="buttons">
<input type="hidden" name="form_id" value="1136056" />
<input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" />
</li>
</ul>
</form>
据我所知,我已将代码放置在网页的指定区域。在您的 HTML 模板上的结束标记和我希望 reCAPTCHA 小部件出现的位置末尾的 sn-p 之前的一个。
我已将recaptcha 放在提交按钮之前。关于服务器端集成有一部分我不明白。
[QUOTE]
When your users submit the form where you integrated reCAPTCHA, you'll
get as part of the payload a string with the name "g-recaptcha-response".
In order to check whether Google has verified that user,
send a POST request with these parameters:
URL: https://www.google.com/recaptcha/api/siteverify
secret (required) xxxxxmysecretkeyxxxxxxx
response (required) The value of 'g-recaptcha-response'.
remoteip The end user's ip address.
[/QUOTE]
任何人都可以请对此有所了解。 谢谢你
【问题讨论】:
标签: html forms submit recaptcha