Login   Register  
PHP Classes
elePHPant
Icontem

finfo

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

  Author  
Picture of Uku-Kaarel Jo~esaar
Name: Uku-Kaarel Jo~esaar <e-mail contact>
Packages: 8 Browse all classes by Uku-Kaarel Jo~esaar Browse all classes by
Country: Estonia Estonia - PHP jobs in Estonia
Age: 30
All time rank: 4641 in Estonia Estonia
Week rank: 151 Up2 in Estonia Estonia Down
Innovation award
Innovation award
Nominee: 5x


  Detailed description   Download .zip .tar.gz  
This class can determine the type of files analyzing its contents.

It provides an interface compatible with PHP finfo extension under systems that do not have that PHP extension available.

It takes the path of a file and uses the file command to analyze its contents when possible. Otherwise the class reads the file contents to guess the file type and character encoding.

  Classes of Uku-Kaarel Jo~esaar  >  finfo  >  Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: finfo
Base name: finfo
Description: Determine the type of files analyzing its contents
Version: 1.0
PHP version: 5
License: GNU General Public License (GPL)
All time users: 305 users
All time rank: 6069
Week users: 1 user
Week rank: 2054 Up
 
  Groups   Rate classes User ratings   Applications   Files Files  

  Groups  
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


  Innovation Award  
PHP Programming Innovation award nominee
March 2012
Number 6

Prize: One downloadable e-book of choice by O'Reilly
finfo is an useful PHP extension that makes it possible to determine the type of data contained in files by examining its contents.

Unfortunately the finfo extension is not available in all PHP setups. This class provides a work around by emulating the functionality of the finfo extensionin pure PHP code.

Manuel Lemos

  User ratings  
Not yet rated by the users

  Applications that use this class  
No application links were specified for this class.
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.finfo.php Class methods to try guess file type
Accessible without login Plain text file example.multipleFiles.php Example Lists directory files and their mime types
Accessible without login Plain text file example.myMagicDef.php Example Shows how to add or replace magic pattern
Accessible without login Plain text file loader.finfo.php Aux. loads finfo class if needed
Accessible without login Plain text file readme.doc.txt Doc. About implementation specific features

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