コード例 #1
0
 public static function tries()
 {
     $prefix = self::getPrefix();
     if (!isset(self::$tries)) {
         self::$tries = isset($_COOKIE[$prefix . '_tries']) ? $_COOKIE[$prefix . '_tries'] + 1 : 0;
     }
     return self::$tries;
 }
コード例 #2
0
ファイル: captcha.php プロジェクト: soldair/solumLite
require SITE_ROOT . '/config.php';
$data_path = SITE_ROOT . '/php/data';
require $data_path . '/data.class.php';
require $data_path . '/format.class.php';
$lib_path = $data_path . '/lib';
foreach (scandir($lib_path) as $file) {
    if (strlen($file) > 4) {
        if (substr($file, strlen($file) - 4) == '.php') {
            require $lib_path . '/' . $file;
        }
    }
}
require SITE_ROOT . '/php/http/sessioncookie.class.php';
//invalid if hit directly with no session
sessionCookie::init();
if (!sessionCookie::tries()) {
    header("HTTP/1.0 404 Not Found");
    exit('invalid request');
}
$width = isset($_GET['width']) ? $_GET['width'] : '100';
$height = isset($_GET['height']) ? $_GET['height'] : '40';
$characters = 6;
new CaptchaSecurityImages($width, $height, $characters);
/*
* Updated by Ryan Day for the solumlite framework and mycypher
* 4-22-2009
*
* File: CaptchaSecurityImages.php
* Author: Simon Jarvis
* Copyright: 2006 Simon Jarvis
* Date: 03/08/06