CODE
header("Content-type: text/html; charset=utf8");
header("Content-type: image/png");
$tekst=$_GET['tekst'];
$obraz = ImageCreate(250, 20);
ImageFilledRectangle($obraz, 0, 0, 250, 20, ImageColorAllocateAlpha($obraz, 255, 255, 255, 0));
ImageTTFText($obraz, 12, 0, 0, 15, ImageColorAllocate($obraz, 222, 1, 1), "MyriadWebPro-Italic.ttf", $tekst);
ImagePNG($obraz);
ImageDestroy($obraz);
header("Content-type: image/png");
$tekst=$_GET['tekst'];
$obraz = ImageCreate(250, 20);
ImageFilledRectangle($obraz, 0, 0, 250, 20, ImageColorAllocateAlpha($obraz, 255, 255, 255, 0));
ImageTTFText($obraz, 12, 0, 0, 15, ImageColorAllocate($obraz, 222, 1, 1), "MyriadWebPro-Italic.ttf", $tekst);
ImagePNG($obraz);
ImageDestroy($obraz);
Wywoływany
plik.php?tekst=Jakis tam tekst
Nie mam koncepcji na zrobienie fajnego cache'a do tego?
moze ktoś ma zrobione już gotowe rozwiązania?