Hi. To generate text on an image using PHP, try something like the following:
PHP Code:
<?php
$pic = "filename.jpg"; // jpg filename
$file = "filename.txt"; // txt filename
$font = 5; // can be 1, 2, 3, 4, or 5
$xpos = 50; // zero is leftmost position
$ypos = 10; // zero to topmost position
$qual = 30; // zero (worst) to 100 (best)
$text = trim(implode("", file($file)));
$im = imagecreatefromjpeg($pic);
$red = imagecolorallocate($im,255,0,0);
imagestring($im, $font, $xpos, $ypos, $text, $red);
imagejpeg($im, '', $qual);
imagedestroy($im);
?>
This assumes PHP is GD enabled. Also, check
here for other image functions.