简体   繁体   English

如何在页面中多次使用Google验证码?

[英]how to use of google captcha multiple times in page?

I have two forms in my page .I want to implement google captcha in both forms. 我的页面中有两种形式。我想以两种形式实现google captcha。 I tried to implement by using get_html() function in both forms but it display only one captha in my page 我试图通过在两种形式中都使用get_html()函数来实现,但它在我的页面中仅显示一个captha

echo $captcha->get_html();

passed public key intenally in google get_html() using interface class. 使用接口类在google get_html()中通常传递公钥。

How can i display captcha in both forms ? 如何以两种形式显示验证码?

Isn't it 是不是

echo recaptcha_get_html($publickey);

The API doesn't include a class, how are you using OOP style code? 该API不包含类,您如何使用OOP样式代码?

Sounds like the javascript only renders this once per page. 听起来像javascript每页仅渲染一次。

One desperate solution might be to <iframe> one or both of the forms? 一种绝望的解决方案可能是<iframe>一种或两种形式?

EDIT: 编辑:
Create a page with the form in html, and access it with <iframe src="http://site.com/form.html"></iframe> 使用html创建带有表单的页面,并使用<iframe src="http://site.com/form.html"></iframe>

Set width and height attributes to desired sizes. 将width和height属性设置为所需的大小。

EDIT (2nd): 编辑(第二):
Well basicly you have a php file rendering and handeling the form data in the <iframe> . 好吧,基本上,您有一个php文件渲染并处理<iframe>的表单数据。 What exactly are you curious about regarding this technique? 您到底对这种技术有什么好奇?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM