分类: 系统运维
2012-08-08 09:31:53
好好学习,天天奋斗
function imgphone($width,$height,$char)
{
$im=imagecreate($width,$height);
imagecolorallocate($im,eee,eee,eee);
$red=imagecolorallocate($im,255,0,0);
imagettftext($im,14,-4,4,19,$red,"simsun.ttc",$char);
header("content-type:image/png");
imagepng($im);
imagedestroy($im);
}
?>
header("content-type:text/html;charset-utf-8");
$aa="/\d{11}/";
if($_POST['sub']) {
if(preg_match($aa,$_POST['phone'])) {
imgphone(200,60,$_POST['phone']);
}
}
?>
原文地址: