PHP Classes

File Info Cache: Cache information about files to a database

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 1,241 This week: 1All time: 3,083 This week: 60Up
Version License Categories
file-info-cache 1.0GNU Lesser Genera...Databases, Files and Folders, Cache, A...


This class browses a directory and recursively caches file information to a database. Once the file information is in a database you can access it easily and efficiently. This script is only intended to run from the shell, from a crontab or similar process; I don't recommend changing permissions on your files for the webserver to access them!

The class was designed to cache information about mp3 files so a weighted playlist system could be constructed for Shoutcast (see example file ./cache-sc-server.php).

To store further information about a file, you may wish to create a new table in the database. If so, please send me your additions and I will incorporate them into the package.

You need the ADODB database tool to run the class ( and you need the AudioFile class ( to cache mp3 files. Currently the class has only been tested with MySQL but should support any database supported by ADODB. Please see the class comments for installation, testing/stats, and license.

Picture of kumar mcmillan
Name: kumar mcmillan <contact>
Classes: 7 packages by
Country: United States United States
Age: 45
All time rank: 14717 in United States United States
Week rank: 35 Up7 in United States United States Up

  Files folder image Files  
File Role Description
Accessible without login Plain text file cache-sc-server.php Example example script to cache mp3 files
Plain text file file-info-cache.class.php Class class source
Accessible without login Plain text file LICENSE Lic. class license

 Version Control Unique User Downloads Download Rankings  
This week:1
All time:3,083
This week:60Up