*/ 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(); }
<?php require 'php-captcha.inc.php'; $aFonts = array('fonts/VeraBd.ttf', 'fonts/VeraIt.ttf', 'fonts/Vera.ttf'); $oVisualCaptcha = new PhpCaptcha($aFonts, 200, 60); $oVisualCaptcha->SetNumChars(4); $oVisualCaptcha->CaseInsensitive(false); $oVisualCaptcha->Create();