This PHP class sniffs the MIME type of many common types of files.