Hi, Is there any way to know the "music play length" (track time) from an mp3, or wav file using "php"? What I want to do is play a file, and "as soon as it stops", play another one... Possible? Any code is extremely appreciated. Thanks
Hi, I tried your class, but it seems to return no output on php5. Here's what I did: <?php //Full code from your class is here ?> <?php $path = $_SERVER['DOCUMENT_ROOT']."dir/"; echo '<h3>'. $path. '</h3>'; $file = "red.mp3"; $tags = new mp3Tags($path, $file); echo "<pre>"; print_r($tags); echo "</pre>"; ?> The script seems to end at the "echo <h3>" line. The echo "<pre>" is never printed on webpage... Am I doing something wrong here? Thanks
Try setting this on top of your page: error_reporting(E_ALL); ini_set('display_errors', '1'); PHP: And try removing the $_SERVER['DOCUMENT_ROOT'], like this: <?php $path = "dir/"; echo '<h3>'. $path. '</h3>'; $file = "red.mp3"; $tags = new mp3Tags($path, $file); echo "<pre>"; print_r($tags); echo "</pre>"; ?> PHP: I've used it, and it worked for me.
Hi, It's giving the following error: Notice: Use of undefined constant bool - assumed 'bool' on line 243 Line 243 is the call to function line: $tags= new mp3Tags($path, $file);
In the first lines of the code, replace this: private $id3v1 = bool; private $id3v2 = bool; PHP: With: private $id3v1l; private $id3v2; PHP:
Hi, I can't seem to get your class working, however you did give me an idea of what is to be done. I found a class in google search and it returns an array with playtimeseconds. I think this will do. Now all I need to do is make a loop at set time intervals. Thank you so much for helping me and also for taking time trouble shooting with me. Green reps added. regards jeet