HerbIgniter User Guide Version 1.7.2


Audio Helper

The Audio Helper file contains functions that assist in working with MP3 files. It uses the PHP library, getid3.

Loading this Helper

This helper is loaded using the following code:

$this->load->helper('audio');

The following functions are available:

mp3titles( $filename )

Lets you fetch mp3 title, artist and album information if the MP3 uses ID3 encoding. These three tags are the most common to MP3 files.

Example:

$mp3_info = mp3titles( 'somefile.mp3' );
echo $mp3_info['title'] . '<br>' . $mp3_info['artist'] . '<br>' . $mp3_info['album'];