include/vdimgck.php
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
/**
* 验证图片
*
* @version $Id: vdimgck.php 1 15:21 2010年7月5日 tianya $
* @package DedeCMS.Libraries
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
require_once (dirname(__FILE__).'/common.inc.php');
require_once (DEDEDATA.'/safe/inc_safe_config.php');
require_once (DEDEDATA.'/config.cache.inc.php');
$config = array(
'font_size' => 14,
'img_height' => $safe_wheight,
'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词
'img_width' => $safe_wwidth,
'use_boder' => TRUE,
'font_file' => dirname(__FILE__).'/data/fonts/ggbi.ttf',
'wordlist_file' => dirname(__FILE__).'/data/words/words.txt',
'filter_type' => 5);
$sessSavePath = DEDEDATA."/sessions/";
// Session保存路径
if(is_writeable($sessSavePath) && is_readable($sessSavePath)){ session_save_path($sessSavePath); }
if(!empty($cfg_domain_cookie)) session_set_cookie_params(0,'/',$cfg_domain_cookie);
if (!echo_validate_image($config))
{
// 如果不成功则初始化一个默认验证码
@session_start();
$_SESSION['securimage_code_value'] = strtolower('abcd');
$im = @imagecreatefromjpeg(dirname(__FILE__).'/data/vdcode.jpg');
header("Pragma:no-cache\r\n");
header("Cache-Control:no-cache\r\n");
header("Expires:0\r\n");
imagejpeg($im);
imagedestroy($im);
}
function echo_validate_image( $config = array() )
{
@session_start();
//主要参数
$font_size = isset($config['font_size']) ? $config['font_size'] : 14;
$img_height = isset($config['img_height']) ? $config['img_height'] : 24;
$img_width = isset($config['img_width']) ? $config['img_width'] : 68;
$font_file = isset($config['font_file']) ? $config['font_file'] : PATH_DATA.'/data/font/ggbi.ttf';
$use_boder = isset($config['use_boder']) ? $config['use_boder'] : TRUE;
$filter_type = isset($config['filter_type']) ? $config['filter_type'] : 0;
//创建图片,并设置背景色
$im = @imagecreate($img_width, $img_height);
imagecolorallocate($im, 255,255,255);
//文字随机颜色
$fontColor[] = imagecolorallocate($im, 0x15, 0x15, 0x15);
$fontColor[] = imagecolorallocate($im, 0x95, 0x1e, 0x04);
后面还有 119 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。