Codice PHP:
<?php
session_start();
if (isset($_SESSION['chiave'])) {
header("Content-type: image/png");
$string = $_SESSION['chiave'];
$img = imagecreatefrompng("bg.png");
$color = imagecolorallocate($img, 0, 90, 60);
imagestring($img, rand(4,5), 15, 10, $string, $color);
imagepng($img);
imagedestroy($img);
}
?>