|Classes of Martin Latter
|PHP Detect File Type
Identify a file through MIME type and file signature detection.
Detect a file's type through MIME type information and file signature (header) bytes.
(File extensions are ignored.)
*nix systems have the
Nevertheless, this command is not always available.
The main uses of File Identifier are:
The file signature data (FileSignatures.php) contain a limited range of common file type signatures in hexadecimal bytes.
This data array can be easily extended with additional and custom file signatures.
File Identifier is released under the GPL v.3.