• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

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

php 搞代码 4年前 (2022-01-24) 13次浏览 已收录 0个评论

win+iis+php架构网站不显示验证码
http://www.xmfoodcn.com/system/login.php

验证码不显示
<?php

require_once ‘../global.php’;

function king_ajax_salt(){
global $king;
$id_fly=kc_post(‘ID’);
$id=substr($id_fly,0,strlen($id_fly)-4);
$salt=kc_random(12);
$js=”\$(‘#{$id}_salt’).val(‘{$salt}’);”;
$s=”lang->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%20king_def(){

global%20$king;
header(“Cache-Control:%20no-cache,%20must-revalidate”);%20//%20HTTP/1.1
header(“Expires:%20Mon,%2026%20Jul%201997%2005:00:00%20GMT”);%20//%20过去的时间

header(“Content-type:%20image/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,%200,%200,%20$width,%20$height,%20imagecolorallocate($img,255,255,255));

//写字
for($i=0;$i<$num;$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),%20rand(-20,20),%20$left,rand(round($size*1.2),$size*1.4),$color,$font,$code);
}
//画星号
$max=$width*$height/400;
for($i=0;$i<$max;$i++){
imagestring($img,%2015,%20rand(0,$width),%20rand(0,$height),%20’*’,rand(192,250));
}
//画点
$max=$width*$height/40;
for($i=0;$i<$max;$i++){
imageSetPixel($img,%20rand(0,%20$width),%20rand(0,%20$height),%20rand(1,200));
}
//画线
$max=$width*$height/800;
for($i=0;$i<$max;$i++){
imageline($img,rand(0,$width),rand(0,$height),rand(0,$width),rand(0,$height),rand(0,255));
}
//写验证码到verify中
$verify=new%20KC_Verify_class;
$verify!本文来源gaodai#ma#com搞*!代#%^码网5

搞gaodaima代码

->Put($salt,$str);

imagePng($img);
imageDestroy($img);

$verify->Clear();
}
?>%20%20%20%20%20%20%20%20%20%20%20%20%20%20

%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20PHP%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20验证码%20%20%20%20%20%20%20%20%20%20%20%20%20%20

——解决方案——————–

$s%20=%20file_get_contents('http://www.xmfoodcn.com/system/verify.php?salt=pkommyjkafe7');
echo%20substr($s,%203);

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:win+iis+php架构网站不显示验证码,该如何解决

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址