添加 ReCaptcha [英] Adding ReCaptcha

查看:55
本文介绍了添加 ReCaptcha的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难在几年前设计的网站上实施 GOOGLE reCAPTCHA.它使用 PHP 模板,表单使用 CGI bin 来处理信息.有没有简单的方法来实现这个?GOOGLE 没有一个简单的调用来集成这个,这似乎很愚蠢,因为我认为他们希望拥有一个更安全、更安全的网络.

I am having a very difficult time attempting to implement GOOGLE reCAPTCHA on a website I designed years back. It uses a PHP template and the form use the CGI bin to process the information. Is there an easy way to implement this? Seems silly that GOOGLE does not have a simple call to integrate this as I would assume they are wanting to have a more safer more secure web.

这是我用来解决这个问题的测试页面.https://www.queensmaidcleaningservice.com/test.html

Here is a test page I am using to figure this out. https://www.queensmaidcleaningservice.com/test.html

我的经历..

我是一名网页设计师.我在 html 和 CSS 编码方面有经验,可以定位和修改一些 JavaScript.我不是全栈开发人员.

I am a web designer. I am experienced in html and CSS coding and can locate and modify some JavaScript. I am not a full stack developer.

我已生成密钥并将以下内容添加到该部分...

I have generated the key and added the following to the to the section...

然后我在提交按钮上方添加了徽章....

I then added the badge above the submit button....

<script language="JavaScript" src="scripts/contact.js" type="text/javascript" ></script>

当然,这只是显示徽章.

Of course, all this does is display the badge.

服务器端验证是我陷入困境的地方.我已经尝试按照 GOOGLE 的说明进行操作,但它没有解释如何".很好.

Server Side Verification is where I get stuck. I have tried following GOOGLE's instructions on this and it does not explain "how to" very well.

同样,这是我用来解决这个问题的测试页面.https://www.queensmaidcleaningservice.com/test.html

Again, here is a test page I am using to figure this out. https://www.queensmaidcleaningservice.com/test.html

有没有人有一个相当直接和简单的方法"?在标准的、基本的联系表格或可能更简单的替代方案上实现这一点?非常令人沮丧,因为这让我感到困惑,他们让在服务器上验证变得如此困难.

Does anyone have a fairly straight forward and simple "method" to implement this on a standard, basic contact form or possibly and easier alternative? Very frustrating as it baffles me they make it so difficult to validate on the server.

任何帮助或建议将不胜感激.谢谢!

Any help or suggestions would be greatly appreciated. Thanks!

推荐答案

您的服务器需要向 Google 发出 HTTP 请求,以验证客户端提交的响应.

Your server needs to make an HTTP request to Google in order to validate the response submitted client-side.

参见:https://stackoverflow.com/a/42322745/6472849

这篇关于添加 ReCaptcha的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆