PHP - View Animated GIF

Asked

Viewed 558 times

0

Hello, I am having a certain difficulty in displaying GIF Animated in my script, I know that the GD library does not display animated GIF, I would like to know how to do this.

I just want to send the Animated GIF from a URL to the browser, 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!

  • some manipulation will be done on the image or it is only to display?

  • Just to show off

1 answer

1

Only to view it is not necessary to use any library. Just send an HTTP header and read the image file with readfile().

<?php
header('Content-Type: image/gif');
readfile('url.gif');
  • Our rsrs, very the fight, it worked! I was using imagegif(), then it didn’t get excited, only appeared the 1st frame.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.