Ciao a tutti.
Io devo creare un'immagine da un testo passato via get. Ho il seguente codice:
Codice PHP:
if($err) {
header('Content-Type: text/plain');
echo $err;
return;
}
//DEFINIZIONE DEL TESTO
$txt= $_GET["testo"];
//DEFINIZIONE DELLA GRANDEZZA
$corp=20;
$haut = $corp*4.5; //ALTEZZA
$larg = strlen($txt)*$haut/1.6; //LARGHEZZA
$img = imagecreate($larg, $haut); //CREAZIONE DELL'IMMAGINE
$background_color = imagecolorallocate ($img, 0, 0, 0);
$transparent_color = imagecolortransparent($img,$background_color);
$noir = imagecolorallocate($img,0,0,0);
imagestring($img, $corp,0,0, $txt,$noir);
header("Content-type: image/gif");
imagegif($img);
Ora vorrei anche assegnare un carattere. Come posso fare? Quali caratteri sono disponibili?