Home >Backend Development >PHP Tutorial >How to determine whether a gif image is animated in php?

How to determine whether a gif image is animated in php?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-25 08:52:571381browse
  1. {
  2. $fp=fopen($filename, 'rb'); $filecontent=fread($fp, filesize($filename));
  3. fclose($fp);
  4. return strpos($filecontent,chr(0x21).chr(0xff).chr(0x0b).'NETSCAPE2.0')===FALSE?0:1;
  5. } // bbs.it-home.org
  6. echo IsAnimatedGif("zzsky.gif");
  7. ?>
复制代码


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn