本文整理汇总了PHP中ReCaptcha::recaptcha_get_html方法的典型用法代码示例。如果您正苦于以下问题:PHP ReCaptcha::recaptcha_get_html方法的具体用法?PHP ReCaptcha::recaptcha_get_html怎么用?PHP ReCaptcha::recaptcha_get_html使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReCaptcha
的用法示例。
在下文中一共展示了ReCaptcha::recaptcha_get_html方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get
/**
* Returns an array with the captcha text entry so user can type
*
* @access public
* @return array Array indexed by captcha (the text entry) and entry (the input)
*/
function get()
{
$res = array();
$objReCaptcha = new ReCaptcha();
$publickey = $GLOBALS['app']->Registry->fetch('reCAPTCHA_public_key', 'Policy');
$reCAPTCHA = $objReCaptcha->recaptcha_get_html($publickey);
$res = array();
$res['key'] = 0;
$res['text'] = $reCAPTCHA;
$res['label'] = _t($this->_label);
$res['title'] = _t($this->_label);
$res['description'] = _t($this->_description);
return $res;
}
示例2: getErrorsOrWarningsForField
}
?>
</span></div>
<div class="contents"><?php
echo $comment->getMessage();
?>
</div>
<?php
}
?>
<div id="comments">
<form action="PostBlogComment.action" method="post">
<?php
if (!isset($_COOKIE[PostBlogComment::CAPTCHA_COOKIE_NAME])) {
echo ReCaptcha::recaptcha_get_html($publickey);
}
?>
<?php
if (hasErrorsOrWarningsForField('name')) {
$messages = getErrorsOrWarningsForField('name');
?>
<div class="inlineError">
<ul>
<?php
foreach ($messages as $message) {
?>
<li><?php
echo $message->getMessage();
?>
</li>