PHP - Display Animated GIF

0

Hello, I'm having a hard time displaying Animated GIF in my script, I know the GD library does not display animated GIF, I'd like to know how I do it.

I just want to send the Animated GIF from a URL to the browser, for example:

//As Funções são apenas para ilustração

$GIF = Pegar_GIF_Animado('url.gif');
header('Content-Type: image/gif');
Exibir_GIF($GIF);

Thank you!

    
asked by anonymous 29.07.2015 / 07:01

1 answer

1

You do not need to use any library to display. Just send an HTTP header and read the image file with readfile() .

<?php
header('Content-Type: image/gif');
readfile('url.gif');
    
29.07.2015 / 14:34