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


PHP Captcha::getImage方法代码示例

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


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

示例1: captcha

 public function captcha()
 {
     $captcha = new Captcha();
     $captcha->getImage($this->session->getCaptcha());
 }
开发者ID:rmcdermott,项目名称:bitsybay,代码行数:5,代码来源:contact.php

示例2: Copyright

<?php

/*********************************************************************
    captcha.php

    Simply returns captcha image.
    
    Peter Rotich <peter@osticket.com>
    Copyright (c)  2006-2013 osTicket
    http://www.osticket.com

    Released under the GNU General Public License WITHOUT ANY WARRANTY.
    See LICENSE.TXT for details.

    vim: expandtab sw=4 ts=4 sts=4:
**********************************************************************/
require_once 'main.inc.php';
require INCLUDE_DIR . 'class.captcha.php';
$captcha = new Captcha(5, 12, ROOT_DIR . 'images/captcha/');
echo $captcha->getImage();
开发者ID:ayurmedia,项目名称:osTicket-1.8,代码行数:20,代码来源:captcha.php

示例3: generateText

session_start();
class Captcha
{
    private $text;
    //construct---------------------------------------------------------------------------------------------------------------------
    function __construct()
    {
    }
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------
    function generateText($length)
    {
        $this->text = md5(microtime() * mktime());
        return substr($this->text, 0, $length);
    }
    function getImage()
    {
        $text = $this->generateText(10);
        $_SESSION['textCap'] = md5($text);
        $captcha = imagecreatefromgif("captcha.gif");
        $colText = imagecolorallocate($captcha, rand(0, 300), rand(0, 100), rand(0, 50));
        for ($x = 0; $x <= 77; $x = $x + 5) {
            imageline($captcha, rand(0, 100000), rand(0, 100), rand(10, 1000), rand(0, 100), $colText);
        }
        //imagestring($captcha,10, 50, 15,$text, $colText);
        return imagegif($captcha);
    }
}
$capt = new Captcha();
//header("Content-type: image/gif");
$capt->getImage();
开发者ID:Batit,项目名称:CadaverAldea,代码行数:30,代码来源:Captcha.class.php

示例4: Captcha

<?php

session_start();
require_once 'file:///C|/wamp/www/CaptchaCodeManagemant/Captcha.php';
$objCaptcha = new Captcha(60, 20);
$objCaptcha->CreateImage();
$objCaptcha->getImage();
$_SESSION["code"] = $objCaptcha->getCode();
//header('location:../CaptchaCodeManagemant/page.php');
开发者ID:harishankar121,项目名称:gitrepogit,代码行数:9,代码来源:captcha.php

示例5: Captcha

<?php

$oCaptcha = new Captcha($fusebox['pathAssets'] . "fonts");
if ($oCaptcha->initialize()) {
    $_SESSION['SecretUserString'] = $oCaptcha->getSecretKey();
    $oCaptcha->getImage();
}
开发者ID:rodionbykov,项目名称:zCMS,代码行数:7,代码来源:dspCaptchaImage.php


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