MIME Types
Date: 07/11/05
(PHP Community) Keywords: php
How would one go about determining a file's MIME type with PHP?
I've seen a few solutions that all involve maintaining a discrete list somewhere and updating it--in addition to any other local MIME type lists--as needed. I'd rather use a less "clumsy" way of doing this if one exists.
EDIT: Nevermind! The function was hiding on me on php.net: mime_content_type. I realize that this has been deprecated by the PECL fileinfo extension, but it works for me for now.
Source: http://www.livejournal.com/community/php/317687.html