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?

WBOY
Release: 2016-07-25 08:52:57
Original
1356 people have browsed it
  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. ?>
复制代码


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template