您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

win+iis+php架构网站不显示验证码,该如何解决

2024/4/16 17:13:04发布6次查看
win+iis+php架构网站不显示验证码
http://www.xmfoodcn.com/system/login.php
验证码不显示
get('system/check/verifynew').\ src=\.$king->config('inst').system/verify.php?salt={$salt}\/>;
$s.=.$king->lang->get('system/check/verifynew').;
kc_ajax('',$s,0,$js);
}
function king_def(){
global $king;
header(cache-control: no-cache, must-revalidate); // http/1.1
header(expires: mon, 26 jul 1997 05:00:00 gmt); // 过去的时间
header(content-type: image/png);
$salt=kc_get('salt',1,1);
$width=$king->config('verifywidth');//图片长度
$height=$king->config('verifyheight');//图片高度
$size=$king->config('verifysize');//文字大小
$num=$king->config('verifynum');//文字数量
$content=$king->config('verifycontent');//随机字符
$array_content=explode('|',$content);
$array_content=array_diff($array_content,array(null));
$array_font=kc_f_getdir('system/verify_font','ttf|ttc');
$str='';
$img=imagecreate($width,$height);//创建一个空白图像
imagefilledrectangle($img, 0, 0, $width, $height, imagecolorallocate($img,255,255,255));
//写字
for($i=0;$i $code=$array_content[array_rand($array_content)];
$str.=$code;//验证码字符
$color=imagecolorallocate($img,rand(0,128),rand(0,128),rand(0,128));
$font='verify_font/'.$array_font[array_rand($array_font)];//随机读取一个字体
$left=rand(round($size*0.2),round($size*0.4))+$i*$size;
imagettftext($img,rand(round($size*0.7),$size), rand(-20,20), $left,rand(round($size*1.2),$size*1.4),$color,$font,$code);
}
//画星号
$max=$width*$height/400;
for($i=0;$i imagestring($img, 15, rand(0,$width), rand(0,$height), '*',rand(192,250));
}
//画点
$max=$width*$height/40;
for($i=0;$i imagesetpixel($img, rand(0, $width), rand(0, $height), rand(1,200));
}
//画线
$max=$width*$height/800;
for($i=0;$i imageline($img,rand(0,$width),rand(0,$height),rand(0,$width),rand(0,$height),rand(0,255));
}
//写验证码到verify中
$verify=new kc_verify_class;
$verify->put($salt,$str);
imagepng($img);
imagedestroy($img);
$verify->clear();
}
?>
php 验证码
------解决方案--------------------
$s = file_get_contents('http://www.xmfoodcn.com/system/verify.php?salt=pkommyjkafe7');
echo substr($s, 3);

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录