本文整理汇总了PHP中PhpCaptcha::SetOwnerText方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpCaptcha::SetOwnerText方法的具体用法?PHP PhpCaptcha::SetOwnerText怎么用?PHP PhpCaptcha::SetOwnerText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhpCaptcha
的用法示例。
在下文中一共展示了PhpCaptcha::SetOwnerText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
*/
include_once 'core/config.php';
if (defined(C_CAPTCHA_ENABLE) && C_CAPTCHA_ENABLE == 'true') {
include_once 'core/3rdparty/captcha/php-captcha.inc.php';
$fonts = 'core/3rdparty/captcha/fonts/';
$aFonts = array($fonts . 'VeraBd.ttf', $fonts . 'VeraIt.ttf', $fonts . 'Vera.ttf');
$captcha = new PhpCaptcha($aFonts, 200, 60);
//Set user options
$captcha->SetWidth(C_CAPTCHA_WIDTH);
$captcha->SetHeight(C_CAPTCHA_HEIGHT);
$captcha->SetNumChars(C_CAPTCHA_CHARACTERS);
$captcha->SetNumLines(C_CAPTCHA_LINES);
if (C_CAPTCHA_ENABLE_SHADOWS === 'true') {
$captcha->DisplayShadow(true);
}
if (C_CAPTCHA_OWNER_TEXT === 'true') {
$captcha->SetOwnerText(BLOGURL);
}
$captcha->SetCharSet(C_CAPTCHA_CHARACTER_SET);
if (C_CAPTCHA_CASE_INSENSITIVE === 'true') {
$captcha->CaseInsensitive(true);
}
//$captcha->SetEdith(C_CAPTCHA_WIDTH);
$captcha->SetMinFontSize(C_CAPTCHA_MIN_FONT);
$captcha->SetMaxFontSize(C_CAPTCHA_MAX_FONT);
if (C_CAPTCHA_USE_COLOR === 'true') {
$captcha->UseColour(true);
}
$captcha->SetFileType(C_CAPTCHA_GRAPHIC_TYPE);
$captcha->Create();
}
示例2: array
if ($_GET['act'] == "MkCaptcha" || $_GET['act'] == "Captcha") {
if ($Settings['captcha_clean'] == "on") {
ob_clean();
}
require $SettDir['inc'] . "captcha.php";
$aFonts = array('inc/fonts/VeraBd.ttf', 'inc/fonts/VeraBI.ttf', 'inc/fonts/VeraIt.ttf', 'inc/fonts/Vera.ttf');
$oPhpCaptcha = new PhpCaptcha($aFonts, 200, 60);
$RNumSize = rand(7, 17);
$i = 0;
$RandNum = null;
while ($i <= $RNumSize) {
$RandNum = $RandNum . dechex(rand(1, 15));
++$i;
}
$RandNum = strtoupper($RandNum);
$oPhpCaptcha->SetOwnerText("Fake Code: " . $RandNum);
$oPhpCaptcha->UseColour(true);
$oPhpCaptcha->Create();
session_write_close();
die;
}
}
require $SettDir['inc'] . 'groupsetup.php';
if ($Settings['board_offline'] == "on" && $GroupInfo['CanViewOffLine'] != "yes") {
header("Content-Type: text/plain; charset=" . $Settings['charset']);
sql_free_result($peresult);
ob_clean();
if (!isset($Settings['offline_text'])) {
echo "Sorry the board is off line.\nIf you are a admin you can login by the admin cp.";
}
if (isset($Settings['offline_text'])) {