PHP Classes

Metyl PHP MIME Type Check: Check a file to detect its MIME type

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-06-05 (9 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: 44 This week: 12All time: 10,309 This week: 15Up
Version License PHP version Categories
metyl 1.0.0Freeware7Files and Folders, Validation, PHP 7
Description Author

This class can check a file to detect its MIME type.

It can take the path of a file as a parameter to determine its type.

The class can check the file name extension and contents using the MIME Magic or FileInfo PHP extension to determine the file MIME type.

The class can return the result stored in class variables that tell if the file is of a correct MIME type or the file MIME type is the same that it was requested to check.

Recommendations

Upload any type of files
Check all the files based on the content

PHP code to identify uploaded file format
I need a code to identify the file format of uploaded file

Picture of wim niemans
  Performance   Level  
Name: wim niemans <contact>
Classes: 6 packages by
Country: The Netherlands The Netherlands
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file demo.php Example a simple demo
Accessible without login Image file Europa Data Image file without extension
Plain text file metyl.class.php Class a static singleton

 Version Control Unique User Downloads Download Rankings  
 0%
Total:44
This week:12
All time:10,309
This week:15Up
For more information send a message to info at phpclasses dot org.