本文整理汇总了PHP中PhpCaptcha::SetMinFontSize方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpCaptcha::SetMinFontSize方法的具体用法?PHP PhpCaptcha::SetMinFontSize怎么用?PHP PhpCaptcha::SetMinFontSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhpCaptcha
的用法示例。
在下文中一共展示了PhpCaptcha::SetMinFontSize方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
return;
}
if ($mode == 'captcha') {
$verification_id = $_REQUEST['verification_id'];
if (empty($verification_id)) {
$verification_id = 'common';
}
$verification_settings = Settings::instance()->getValues('Image_verification');
$fonts = array(Registry::get('config.dir.lib') . 'other/captcha/verdana.ttf');
$c = new PhpCaptcha($verification_id, $fonts, $verification_settings['width'], $verification_settings['height']);
// Set string length
$c->SetNumChars($verification_settings['string_length']);
// Set number of distortion lines
$c->SetNumLines($verification_settings['lines_number']);
// Set minimal font size
$c->SetMinFontSize($verification_settings['min_font_size']);
// Set maximal font size
$c->SetMaxFontSize($verification_settings['max_font_size']);
$c->SetGridColour($verification_settings['grid_color']);
if ($verification_settings['char_shadow'] == 'Y') {
$c->DisplayShadow(true);
}
if ($verification_settings['colour'] == 'Y') {
$c->UseColour(true);
}
if ($verification_settings['string_type'] == 'digits') {
$c->SetCharSet(array(2, 3, 4, 5, 6, 8, 9));
} elseif ($verification_settings['string_type'] == 'letters') {
$c->SetCharSet(range('A', 'F'));
} else {
$c->SetCharSet(fn_array_merge(range('A', 'F'), array(2, 3, 4, 5, 6, 8, 9), false));
示例2: array
<?php
require 'php-captcha.inc.php';
$fonts = array('fonts/VeraBd.ttf', 'fonts/VeraIt.ttf', 'fonts/Vera.ttf');
$captcha = new PhpCaptcha($fonts, 140, 50);
//$captcha->SetBackgroundImages('images/captcha.jpg');
$captcha->setNumChars(4);
$captcha->SetNumLines(80);
$captcha->UseColour(true);
//$captcha->DisplayShadow(true);
$captcha->SetMinFontSize(13);
$captcha->SetMaxFontSize(19);
$captcha->SetCharSet('A-Z,1-9');
$captcha->Create();
示例3: array
<?php
////////////////////////////////////////////////////////////////////////////
//
// (c) phpChess Limited, 2004-2006, in association with Goliath Systems.
// All rights reserved. Please observe respective copyrights.
// phpChess - Chess at its best
// you can find us at http://www.phpchess.com.
//
////////////////////////////////////////////////////////////////////////////
require 'php-captcha.inc.php';
// define fonts
$aFonts = array('fonts/VeraBd.ttf');
// create new image
$oPhpCaptcha = new PhpCaptcha($aFonts, 150, 30);
$oPhpCaptcha->SetBackgroundImages('val.jpg');
$oPhpCaptcha->SetWidth(150);
$oPhpCaptcha->SetHeight(30);
$oPhpCaptcha->SetNumChars(5);
$oPhpCaptcha->SetMinFontSize(10);
$oPhpCaptcha->SetMinFontSize(12);
$oPhpCaptcha->UseColour(True);
$oPhpCaptcha->DisplayShadow(False);
$oPhpCaptcha->SetNumLines(250);
$oPhpCaptcha->Create();
示例4: 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();
}
示例5: array
<?php
/**
* CAPTCHA image creator
*
* @see : http://www.ejeliot.com/pages/2
*/
// include captcha class
require 'php-captcha.inc.php';
// define fonts
$aFonts = array('fonts/VeraSeBd.ttf', 'fonts/VeraSe.ttf', 'fonts/VeraBd.ttf');
// create new image
$aPhpCaptcha = new PhpCaptcha($aFonts, 200, 50);
$aPhpCaptcha->SetBackgroundImages('images/beach.jpg');
$aPhpCaptcha->UseColour(true);
$aPhpCaptcha->SetMinFontSize(12);
//$aPhpCaptcha->SetFileType('png');
//$aPhpCaptcha->SetNumChars(6);
//$aPhpCaptcha->SetOwnerText('CAPTCHA Code');
$aPhpCaptcha->Create();