// @created 29.08.2009 $hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); $text = (!empty($_POST['t'])) ? $_POST['t'] : $hostname; $msg = (!empty($_POST['m'])) ? $_POST['m'] : ''; $r = (is_numeric($_POST['r'])) ? $_POST['r'] : round(rand(1,255)); $g = (is_numeric($_POST['g'])) ? $_POST['g'] : round(rand(1,255)); $b = (is_numeric($_POST['b'])) ? $_POST['b'] : round(rand(1,255)); if (!empty($_POST)) { $width = (is_numeric($_POST['w'])) ? $_POST['w'] : 1024; $height = (is_numeric($_POST['h'])) ? $_POST['h'] : 768; $im = imagecreatetruecolor($width, $height) or die('GD not work is!'); $font_size = (is_numeric($_POST['font_size'])) ? $_POST['font_size'] : 52; $font = 'BEBAS'; $bg_color = imagecolorallocate($im, $r, $g, $b); $text_color = imagecolorallocate($im, 255, 255, 255); imagefill($im, 0, 0, $bg_color); putenv('GDFONTPATH=' . realpath('.')); $y = ($height/2)-($font_size/2)+25; $x = $font_size*1.5; // "Drop shadow" $grey = imagecolorallocate($im, 28, 28, 28); imagettftext($im, $font_size, 0, $x+1, $y+1, $grey, $font, $text); imagettftext($im, $font_size, 0, $x, $y, $text_color, $font, $text); imagettftext($im, 12, 0, $x, $y+20, $text_color, $font, $msg); header('Content-type: image/png'); imagepng($im); imagedestroy($im); exit(); } ?> desklabel

x @ . R G B