On 5/10/07, Jon Baer <[EMAIL PROTECTED]> wrote:
What you're really looking for the is the 'magic' of the bin file.
http://en.wikipedia.org/wiki/Magic_number_%28programming%29
There is a PECL extension for diving into libmagic ...
http://pecl.php.net/package/Fileinfo
In the past, I've made use of the unix file command for this.
csnyder$ file -bi Desktop/DSC01060.jpg
image/jpeg
Command above uses -b for brief, and -i to get the mimetype of the file.
--
Chris Snyder
http://chxo.com/
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php