공통: 캡챠 표시 안 되는 문제 해결
This commit is contained in:
@ -31,10 +31,10 @@ class KCAPTCHA{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
$alphabet_length=strlen($alphabet);
|
$alphabet_length=strlen($alphabet);
|
||||||
|
|
||||||
do{
|
do{
|
||||||
/*
|
/*
|
||||||
// generating random keystring
|
// generating random keystring
|
||||||
@ -132,7 +132,7 @@ class KCAPTCHA{
|
|||||||
$img2=imagecreatetruecolor($width, $height+($show_credits?12:0));
|
$img2=imagecreatetruecolor($width, $height+($show_credits?12:0));
|
||||||
$foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]);
|
$foreground=imagecolorallocate($img2, $foreground_color[0], $foreground_color[1], $foreground_color[2]);
|
||||||
$background=imagecolorallocate($img2, $background_color[0], $background_color[1], $background_color[2]);
|
$background=imagecolorallocate($img2, $background_color[0], $background_color[1], $background_color[2]);
|
||||||
imagefilledrectangle($img2, 0, 0, $width-1, $height-1, $background);
|
imagefilledrectangle($img2, 0, 0, $width-1, $height-1, $background);
|
||||||
imagefilledrectangle($img2, 0, $height, $width-1, $height+12, $foreground);
|
imagefilledrectangle($img2, 0, $height, $width-1, $height+12, $foreground);
|
||||||
$credits=empty($credits)?$_SERVER['HTTP_HOST']:$credits;
|
$credits=empty($credits)?$_SERVER['HTTP_HOST']:$credits;
|
||||||
imagestring($img2, 2, $width/2-imagefontwidth(2)*strlen($credits)/2, $height-2, $credits, $background);
|
imagestring($img2, 2, $width/2-imagefontwidth(2)*strlen($credits)/2, $height-2, $credits, $background);
|
||||||
@ -203,12 +203,12 @@ class KCAPTCHA{
|
|||||||
imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue));
|
imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newred, $newgreen, $newblue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||||
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
header('Cache-Control: post-check=0, pre-check=0', FALSE);
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
|
||||||
if(function_exists("imagejpeg")){
|
if(function_exists("imagejpeg")){
|
||||||
header("Content-Type: image/jpeg");
|
header("Content-Type: image/jpeg");
|
||||||
imagejpeg($img2, null, $jpeg_quality);
|
imagejpeg($img2, null, $jpeg_quality);
|
||||||
|
|||||||
Reference in New Issue
Block a user