<?php $width = 640; $height = 480; $text = "THIS IS A TEST FROM JOHN"; $fontsize = 5; $img = imagecreate($width, $height); // Transparent background $black = imagecolorallocate($img, 0, 0, 0); imagecolortransparent($img, $black); // Red text $red = imagecolorallocate($img, 255, 0, 0); imagestring($img, $fontsize, 0, 0, $text, $red); header('Content-type: image/png'); imagepng($img); imagedestroy($img); ?>