/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//PHP <?php function magicFunction($file){ //get the $length require_once('getid3.php'); $getID3 = new getID3; $ThisFileInfo = $getID3->analyze($file); $length = $ThisFileInfo['playtime_string'];// or playtime_seconds that is preformatted echo "source=\"".$file."\" length=\"".$length."\" "; } ?> //XML <mp3 <?php magicFunction("some.mp3"); ?> />