当前位置: 首页>>代码示例>>PHP>>正文


PHP PhpCaptcha::UseColour方法代码示例

本文整理汇总了PHP中PhpCaptcha::UseColour方法的典型用法代码示例。如果您正苦于以下问题:PHP PhpCaptcha::UseColour方法的具体用法?PHP PhpCaptcha::UseColour怎么用?PHP PhpCaptcha::UseColour使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PhpCaptcha的用法示例。


在下文中一共展示了PhpCaptcha::UseColour方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: image

 function image()
 {
     $imagesPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'PhpCaptcha' . DS . 'fonts' . DS;
     $aFonts = array($imagesPath . 'VeraBd.ttf', $imagesPath . 'VeraIt.ttf', $imagesPath . 'Vera.ttf');
     $oVisualCaptcha = new PhpCaptcha($aFonts, 200, 60);
     $oVisualCaptcha->UseColour(true);
     //$oVisualCaptcha->SetOwnerText('Source: '.FULL_BASE_URL);
     $oVisualCaptcha->SetNumChars(6);
     $oVisualCaptcha->Create();
 }
开发者ID:ghlnv,项目名称:etalentos,代码行数:10,代码来源:CaptchaComponent.php

示例2: image

 function image()
 {
     $imagesPath = realpath(VENDORS . 'phpcaptcha') . '/fonts/';
     $aFonts = array($imagesPath . 'VeraBd.ttf', $imagesPath . 'VeraIt.ttf', $imagesPath . 'Vera.ttf');
     $oVisualCaptcha = new PhpCaptcha($aFonts, 200, 60);
     $oVisualCaptcha->UseColour(true);
     //$oVisualCaptcha->SetOwnerText('Source: '.FULL_BASE_URL);
     $oVisualCaptcha->SetNumChars(6);
     $oVisualCaptcha->Create();
 }
开发者ID:ralaxraja,项目名称:phlypheonix,代码行数:10,代码来源:captcha.php

示例3: image

 function image()
 {
     $imagesPath = APP . 'vendors' . DS . 'phpcaptcha' . '/fonts/';
     $aFonts = array($imagesPath . 'VeraBd.ttf', $imagesPath . 'VeraIt.ttf', $imagesPath . 'Vera.ttf');
     $oVisualCaptcha = new PhpCaptcha($aFonts, 220, 60);
     $oVisualCaptcha->UseColour(true);
     $oVisualCaptcha->SetNumLines(false);
     $oVisualCaptcha->DisplayShadow(false);
     //$oVisualCaptcha->SetOwnerText('Source: '.FULL_BASE_URL);
     $oVisualCaptcha->SetNumChars(5);
     $oVisualCaptcha->Create();
 }
开发者ID:vsanth,项目名称:propertykon,代码行数:12,代码来源:captcha.php

示例4: CaptchaCreate

 static function CaptchaCreate($size)
 {
     $v = new PhpCaptcha(null, 100, 50);
     $v->UseColour(true);
     $v->SetNumChars(4);
     $v->Create();
 }
开发者ID:caijinlin,项目名称:hackathon,代码行数:7,代码来源:Utility.class.php

示例5: array

    $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));
    }
    if (!empty($verification_settings['background_image'])) {
        $c->SetBackgroundImages(fn_get_files_dir_path() . $verification_settings['background_image']);
    }
    $c->Create();
    exit;
} elseif ($mode == 'custom_image') {
    if (empty($_REQUEST['image'])) {
开发者ID:heg-arc-ne,项目名称:cscart,代码行数:31,代码来源:image.php

示例6: array

<?php

// include captcha class
require 'php-captcha.inc.php';
// define fonts
$aFonts = array('fonts/VeraMoBd.ttf', 'fonts/Dekadens.ttf', 'fonts/SwatchIt.ttf');
// create new image
$oPhpCaptcha = new PhpCaptcha($aFonts, 200, 60);
$oPhpCaptcha->UseColour(true);
$oPhpCaptcha->Create();
?>


开发者ID:riptide2k,项目名称:seditio-guestbook,代码行数:11,代码来源:captcha.php

示例7: array

<?php

require 'php-captcha.inc.php';
$fonts = array('', 'Bd', 'BI', 'It', 'MoBd', 'MoBI', 'MoIt', 'Mono', 'Se', 'SeBd');
for ($i = 0; $i < count($fonts); $i++) {
    $fonts[$i] = 'ttf-bitstream-vera-1.10/Vera' . $fonts[$i] . '.ttf';
}
$alphabet = 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z';
$alphabet = explode('_', $alphabet);
shuffle($alphabet);
$captchaText = '';
for ($i = 0; $i < 5; $i++) {
    $captchaText .= $alphabet[$i];
}
$time = time();
setcookie('Captcha', md5("ORHFUKELFPTUEODKFJ" . $captchaText . $_SERVER['REMOTE_ADDR'] . $time) . '.' . $time, null, '/');
$oVisualCaptcha = new PhpCaptcha($fonts, strlen($captchaText) * 23, 60);
$oVisualCaptcha->UseColour(true);
$oVisualCaptcha->Create($captchaText);
开发者ID:ylefebvre,项目名称:link-library,代码行数:19,代码来源:easycaptcha.php

示例8: 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();
开发者ID:gambric,项目名称:ceramichesofia,代码行数:14,代码来源:captcha.php


注:本文中的PhpCaptcha::UseColour方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。