From 160c450eab17ad0922bcfab403b8cb7fccb7adcf Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 23 Feb 2010 23:34:00 +0200 Subject: First commit --- BEBAS.TTF | Bin 0 -> 36796 bytes index.php | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 BEBAS.TTF create mode 100644 index.php diff --git a/BEBAS.TTF b/BEBAS.TTF new file mode 100644 index 0000000..eaff486 Binary files /dev/null and b/BEBAS.TTF differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..4fc5276 --- /dev/null +++ b/index.php @@ -0,0 +1,98 @@ + +// @created 29.08.2009 +$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']); +$text = (!empty($_POST['t'])) ? $_POST['t'] : $hostname; + +$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); + + header("Content-type: image/png"); + imagepng($im); + imagedestroy($im); + exit(); + +} + +?> + + + + + + + Desklabel + + + + + +
+ + + +
+ + x + + @ + + . + R + G + B +

+ +
+ + + -- cgit v1.2.3