0
如何更改captcha的字体系列,并在captcha背景中提供图片,请告诉我是否有人知道该问题。代码如下:如何更改captcha的字体系列并在captcha背景中显示图片?
<?php
session_start();
$change_time = md5(microtime());
$get_value = substr($change_time, 0, 6);
$_SESSION['value'] = $get_value;
$create_image = imagecreate(100, 30);
imagecolorallocate($create_image, 51, 112, 183);
$text_color = imagecolorallocate($create_image, 255, 255, 255);
imagestring($create_image, 50, 15, 7, $get_value, $text_color);
header('Content:image/jpeg');
imagejpeg($create_image);
?>