PHP code example of mhor / php-mp3info

1. Go to this page and download the library: Download mhor/php-mp3info library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mhor / php-mp3info example snippets



//...
use Mhor\PhpMp3Info\PhpMp3Info;
//...
$mp3Info = new PhpMp3Info();
$mp3Tags = $mp3Info->extractId3Tags('music.mp3');
echo $mp3Tags->getAlbum();
echo $mp3Tags->getTitle();
echo $mp3Tags->getArtist();
echo $mp3Tags->getTrack();
echo $mp3Tags->getBitrate();
echo $mp3Tags->getLength();
//...
bash
$ composer