100) die(); list($r, $g, $b) = explode(',',$rgb); $font = 'font/'.$font.'.ttf'; $argu = imagettfbbox($weight, 0, $font, $_GET['string']); $im = @imagecreate($argu[2] + 6, ($weight + ($weight * 30 / 42))) or die(); $bg = imagecolorallocatealpha($im, 255, 255, 255, 127); $fg = imagecolorallocate($im, $r, $g, $b); imagettftext($im, $weight, 0, 2, $weight + 4, $fg, $font, $_GET['string']); imagepng($im); imagepng($im, CACHE_DIR.$key.'.png'); imagedestroy($im); } else { echo file_get_contents(CACHE_DIR.$key.'.png'); } ?>