PHP code example of duncan3dc / meta-audio

1. Go to this page and download the library: Download duncan3dc/meta-audio 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/ */

    

duncan3dc / meta-audio example snippets


$tagger = new \duncan3dc\MetaAudio\Tagger;
$tagger->addDefaultModules();

$mp3 = $tagger->open("/var/music/song.mp3");

echo "Artist: {$mp3->getArtist()}\n";
echo "Album: {$mp3->getAlbum()}\n";
echo "Year: {$mp3->getYear()}\n";
echo "Track No: {$mp3->getTrackNumber()}\n";
echo "Title: {$mp3->getTitle()}\n";