Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/09/2008, 03:51
hmv
 
Fecha de Ingreso: abril-2005
Mensajes: 323
Antigüedad: 21 años, 6 meses
Puntos: 0
Busqueda Crear JPG con texto raro

Hola a todos,

Estoy tratando de crear un .jpg con texto de caracteres raros eje. Ł y mas, y no encuentro la manera. Pues mis clientes son de paises de europa del este.
nota: Ł ='&#321';

Código PHP:
// create example image
$im = imagecreate(200, 20);
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 255);
$text = "Ł--ľščťžýáíéúäňôď...Ł abc"; 
//$text='Ł';

//simple convert string
$string = iconv("ISO-8859-1", "UTF-8", $text);

// write converted string at the top left
imagestring($im, 4, 0, 0, $string, $textcolor);

// output the image
header("Content-type: image/png");
header("Content-Type" content="text/html; charset=iso-8859-1");
imagepng($im); 
muchas gracias.