PHP Classes
elePHPant
Icontem

M3U Playlist Parser: Parse M3U playlist files

Recommend this page to a friend!

  Author Author  
Picture of Robert Widdick
Name: Robert Widdick <contact>
Classes: 3 packages by
Country: United States United States


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class (rewritten from the old M3U Playlist Parser) now features optimized code and is more user friendly (function-wise) than that of the older M3U Playlist parser. You're now able to search through M3U entry titles and locations using multi-(or single) search and case[in]sensitive searching as well. You're able to pull records out that have a play time (in seconds) that are less than, less than or equal to, greater than, greater than or equal to or in between a $START and $END seconds time.

I've also included a (quite long) function that outputs a "pretty" and human-readable format which includes the song titles, locations and track time. You're able to customize the table output (if you use a table) or you can use plain-text output (which isn't pretty at all, mind you). The output of this also includes some "statistics" about the M3U, such as total tracks and combined playlist playing time (HH:MM:SS).

Hope you enjoy this new release, and as always, please contact me if you have any questions, comments or suggestions - as they might show up in future releases!

Notice: This script is not for any commercial usage without my consent. Thanks!

Warning: I have used this script to parse a playlist file of over 6,000 items without any problems. This script processes M3U files FAST! However, I'm not sure how bad it would be if you were to have anything over 10,000 playlist items - but it depends on the system and its configuration, so use with care.

**Notice** This version is incompatible with any of the lesser versions of 2.1.3. Please be sure to update your functions when calling from an object!

**Updated** 02-14-2010 -- Removed BC Math functions for users without access to the functions themselves.
-- Benchmark results:
- 100,000 Entries parsed in 3.186 seconds (with pretty formatting)
- 100,000 Entries parsed in 1.509 seconds (without any output)
-- Benchmarked system: AMD Athlon X2 4200+ @ 2.45GHz, 2GB RAM

  Classes of Robert Widdick  >  M3U Playlist Parser  >  Download Download .zip .tar.gz  >  Support forum Support forum (3)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: M3U Playlist Parser
Base name: m3u-class
Description: Parse M3U playlist files
Version: 2.1.5
PHP version: 5.0.0
Licenses: Free for non-commercial use
GNU General Public License (GPL)
The PHP License
 
  Groups   Applications   Related pages   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
Group folder image Audio Voice and music data generation and manipulation View top rated classes
Group folder image Parsers Programming language interpreters and format parsers View top rated classes


  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.


  Related pages  
WinAmp
Download WinAmp!

  Files folder image Files  
File Role Description
Plain text file m3u.class.php Class Main Class with examples (Bottom of source) & documentation
Accessible without login Plain text file Skillet.m3u Data Sample m3u file for the band "Skillet"
Accessible without login Image file m3ulogo.png Icon m3u Class Logo
Accessible without login Image file Screenshot.png Output Screenshot

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