I have a php file (text.php) that will create text to image.
ie domain.com/txt.php?text=hello will outputs an image with hello written on it.
I want that image to be cached as it is called very often.
So where did this caching occurs? Browser or in server. Is it possible to implement dynamically generated image caching in server.
If so please share the headers to achieve this.
Thanks in advance.
Nb.
This is the content of text.php file
<?php
$txt=$_GET["text"];
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 10, 1, 1, $txt, $text_color);
header('Content-type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
?>