Login   Register  
PHP Classes

PHP Mime Type Class: Determine the MIME type of a file

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Robert Widdick
Name: Robert Widdick <contact>
Classes: 3 packages by
Country: United States United States
Age: 27
All time rank: 877113 in United States United States
Week rank: 254 Up25 in United States United States Up

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to determine the MIME type of a file.

If the finfo extension is available it uses it to determine the MIME type of a given file.

If the finfo extension is not available, the class extracts the file name extension and looks up in an array that associates file name extensions to MIME types.

  Classes of Robert Widdick  >  PHP Mime Type Class  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Mime Type Class
Base name: phpmimetypeclass
Description: Determine the MIME type of a file
Version: 1.0
PHP version: 5.0
Licenses: Free For Educational Use
Free for non-commercial use
Freely Distributable
GNU General Public License (GPL)
The PHP License
All time users: 1101 users
All time rank: 3155
Week users: 1 user
Week rank: 1547 Up
  Groups   Screenshots Screenshots   Rate classes User ratings   Applications   Files Files  

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Files and Folders Listing, accessing and manipulating files and folders View top rated classes

  Files folder image Screenshots  
File Role Description
Accessible without login Image file ss.jpg Screen Simple Screenshot

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Sufficient (62%) Not sure (56%) - Sufficient (75%) - - Not sure (44%) 1978
Month: Not yet rated by the users

  Applications that use this package  
PHP 5 Required
Apache 2+
Apache 2+ Required
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file class.mime.php Class This is a PHP 5 class for attempting to detect the MIME type of a file. Uses FINFO (if available), a pre-defined MIME list, mime_content_type() or defaults to "application/octet-stream" for unknown types.
Plain text file class.types.php Conf. This includes the robust array of mime types
Plain text file example.php Example An example of how to list all files in a directory and display its name, size and MIME type
Plain text file LICENSE.txt Lic. The GNU GPL License

Install with Composer Install with Composer - Download Download all files: phpmimetypeclass.tar.gz phpmimetypeclass.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.