Detecting animated GIF on the fly using PHP/CodeIgniter
Check out this comment to the documentation for function imagecreatefromgif (on php.net). You still need to first download the image file even if you are just going to link to it later.
I think, ImageMagick really will be your best chance:
identify -format %n posible_animation.gif
Please check the forum post How to identify animated image format for more information.