本文整理汇总了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();
}
示例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__);
}
示例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);
}
示例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();
}
示例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);
示例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('&', '&', $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();
}
}