Forum Moderators: coopster
Here's something I'm using:
<?
header("Content-type: image/gif");
$path = "data/" . $_GET['user'] . "/images/" . $_GET['filename'];
$im = ImageCreateFromgif($path);
imagegif($im);
?>
It works fine for images that aren't animated but the images the are just stop on the first frame.
Is there something else I need to do? Any help would be appreciated.
<?
$path = "data/" . $_GET['user'] . "/images/" . $_GET['filename'];
$img = fread(fopen($path,'r'),filesize($path));
fclose($path);
header("Content-type: image/gif");
echo $img;
?> You should of course do some checking to make sure that the user input (from GET) is kosher, and that the file is in fact a valid GIF, before outputting.
[edit: typo]
[edited by: IanKelley at 8:02 pm (utc) on Feb. 22, 2009]