//
// (C)2011 Dag Jonny Nedrelid
// Website: http://thronic.com
//
// This file takes as a GET variable, returns it on a png image.
//
if (!isset($_GET['s']))
exit;
$img = imagecreatetruecolor(50, 20);
$bg_color = imagecolorallocate($img, 255, 255, 255);
$text_color = imagecolorallocate($img, 0, 0, 0);
imagefill($img, 0, 0, $bg_color);
imagestring($img, 4, 5, 2, $_GET['s'], $text_color);
// Return and show new image
header('Content-Type: image/png');
imagepng($img, NULL, 0);
imagedestroy($img);