Código PHP:
<?
$texto = 'imagen faltante';
$imagen2 = imagecreate(100, 50);
// se crea el color de fondo
$color = imagecolorallocate($imagen2, 245, 245, 245);
// se muestra la imagen y se liberan los recursos
imagepng($imagen2);
imagedestroy($imagen2);
?>