Escribir un texto dentro de una imagen con PHP y librerías GD

Este sería el código:

<?php
header
("Content-type: image/png");
$im = @imagecreate(110, 20)
or die(
"No se puede inizializar las librerías GD");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "Hola Mundo", $text_color);
imagepng($im);
imagedestroy($im);
?>

Así de fácil.


blog comments powered by Disqus
 
Google Analytics Alternative