How to retrieve artist, comments, title and other ID3 tags using getid3 function?

StackOverflow https://stackoverflow.com/questions/16294125

  •  13-04-2022
  •  | 
  •  

سؤال

I am only able to retrieve the duration, and filesize of an audio using the code below. But how can you retrieve the other data like the artist, comments, and title using getid3 function?

 $getID3 = new getID3;
    $filename = 'mp3/file.mp3';
    $file = $getID3->analyze($filename);
    echo"Duration: ".$file['playtime_string'];
    echo " / Filesize: ".$file['filesize']." bytes<br />";
هل كانت مفيدة؟

المحلول

Do a print_r($file) to see all the elements of the array.

Alternatively, the product's documentation may reveal the respective other array elements.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top