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


PHP Captcha::showImage方法代码示例

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


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

示例1: captcha

 public function captcha()
 {
     $this->load->library('captcha');
     $captcha = new Captcha();
     $this->session->data['captcha'] = $captcha->getCode();
     $captcha->showImage();
 }
开发者ID:artlabsdesign,项目名称:missbloom,代码行数:7,代码来源:ULTIMATUMcontactform.php

示例2: main

 public function main()
 {
     //init controller data
     $this->extensions->hk_InitData($this, __FUNCTION__);
     $this->load->library('captcha');
     $captcha = new Captcha();
     $this->session->data['captcha'] = $captcha->getCode();
     $captcha->showImage();
     //init controller data
     $this->extensions->hk_UpdateData($this, __FUNCTION__);
 }
开发者ID:harshzalavadiya,项目名称:fatak,代码行数:11,代码来源:captcha.php

示例3: captcha

 public function captcha()
 {
     $this->load->library('captcha');
     $font = $this->config->get('config_captcha_font');
     $captcha = new Captcha();
     $this->session->data['captcha'] = $captcha->getCode();
     $captcha->showImage($font);
 }
开发者ID:ahmatjan,项目名称:OpenCart-Overclocked,代码行数:8,代码来源:quote.php

示例4: captcham5

 public function captcham5()
 {
     $this->load->library('captcham5');
     $this->language->load('record/record');
     $this->data['entry_captcha'] = $this->language->get('entry_captcha');
     $this->data['entry_captcha_title'] = $this->language->get('entry_captcha_title');
     $this->data['entry_captcha_update'] = $this->language->get('entry_captcha_update');
     if ($this->customer->isLogged()) {
         $this->data['captcha_status'] = false;
     } else {
         $this->data['captcha_status'] = true;
         $captcha = new Captcha();
         if (!isset($this->session->data['captcha'])) {
             $this->session->data['captcha'] = '';
         }
         $captcha->setCode($this->session->data['captcha']);
         $this->data['captcha_keys'] = "";
         for ($i = 0; $i < strlen($this->session->data['captcha']); $i++) {
             $k = rand(0, 1);
             $pos = strpos($this->data['captcha_keys'], $this->session->data['captcha'][$i]);
             if ($pos === false) {
                 if ($k == 1) {
                     $this->data['captcha_keys'] = $this->data['captcha_keys'] . $this->session->data['captcha'][$i];
                 } else {
                     $this->data['captcha_keys'] = $this->session->data['captcha'][$i] . $this->data['captcha_keys'];
                 }
             }
         }
     }
     $this->data['theme'] = $this->config->get('config_template');
     $captcha->showImage();
 }
开发者ID:BulatSa,项目名称:Ctex,代码行数:32,代码来源:treecomments.php

示例5: Captcha

<?php

include_once 'headers.php';
include_once 'common.php';
include_once 'libraries/captcha/class.captcha.php';
$captcha = new Captcha();
$pathToCaptchaFonts = dirname(__FILE__) . '/fonts/';
$captchaColors = unserialize(CAPTCHA_COLORS);
$captcha->charsNumber = CAPTCHA_CHARS_NUMBER;
$captcha->stringType = CAPTCHA_STRING_TYPE;
$captcha->fontSize = CAPTCHA_FONT_SIZE;
$captcha->textColor = $captchaColors['text'];
$captcha->backgroundColor = $captchaColors['background'];
$captcha->ttFont = $pathToCaptchaFonts . CAPTCHA_TT_FONT . '.ttf';
$captcha->showImage(CAPTCHA_IMAGE_WIDTH, CAPTCHA_IMAGE_HEIGHT);
开发者ID:pete-naish,项目名称:4hair,代码行数:15,代码来源:captcha.php

示例6: captcha

 public function captcha()
 {
     if (!isset($this->request->get['key']) || !($form_info = id::decode($this->request->get['key']))) {
         return;
     }
     if (isset($this->request->get['a']) && $this->request->get['a'] == 'reload') {
         $json = array('url' => str_replace('&amp;', '&', $this->url->link('module/quick_order_pro/captcha', 'key=' . $this->request->get['key'] . '&r=' . uniqid())));
         $this->response->setOutput(json_encode($json));
     } else {
         $setting = $this->getSetting();
         $captcha = new Captcha($setting['captcha_alphabet'], (int) $setting['captcha_count_items']);
         $captcha->line_color = explode(',', $setting['color_line']);
         $captcha->text_color = explode(',', $setting['captcha_color']);
         $captcha->showLine = (int) $setting['show_lines'];
         if ($form_info['position'] == 0) {
             // content
             $captcha->width = 110;
             $captcha->height = 40;
         }
         if (!array_key_exists('quick_order_pro_captcha', $this->session->data)) {
             $this->session->data['quick_order_pro_captcha'] = array();
         }
         $this->session->data['quick_order_pro_captcha'][$this->request->get['key']] = $captcha->getCode();
         $captcha->showImage();
     }
 }
开发者ID:SwayWebStudio,项目名称:night.com,代码行数:26,代码来源:quick_order_pro.php


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