function AniGifCheck($path){
$str = @file_get_contents($path);
$strChk = true;
$frameCnt = $idx = 0;
$gifFrame = chr(hexdec("0x21")).chr(hexdec("0xF9")).chr(hexdec("0x04"));
$gfLenth = strlen($gifFrame);
if( strlen($str) <= 0 ){
return 'Not Found';
exit;
}
while( $strChk == true ){
if( strpos($str, $gifFrame,$idx) ){
$frameCnt++;
$idx = strpos($str, $gifFrame,$idx)+$gfLenth;
$strChk = true;
} else if( $frameCnt >= 3 || !strpos($str, $gifFrame,$idx) ){
break;
}
}
return $frameCnt > 1 ? true : false;
}
ani gif인경우는 true 아니면 false를 반환합니다.