function isAnimated($filename) { $fp = fopen($filename, "rb"); $whole = fread($fp, filesize($filename)); $i = -1; while($i = strpos($whole, 0x2C, $i+1)) { if(strpos($whole, 0x00, $i-1) == $i-1) { $c++; } } if($c > 1) { return true; } else { return false; } }