In my last post, I described how to install the Fileinfo PECL module on a Media Temple (dv) server, but I didn't really talk about what it does, why one might want to install it and how to use it.

The methods/functions in the Fileinfo PHP extension "try to guess the content type and encoding of a file by looking for certain magic byte sequences at specific positions within the file. While this is not a bullet proof approach, the heuristics used do a very good job."1 (Note that this module replaces the Mimetype module.)

Read the rest of this entry »