Asked  7 Months ago    Answers:  5   Viewed   42 times

Is there any PHP function that will give me the MP3 duration. I looked at ID 3 function but i don't see any thing there for duration and apart from this,id3 is some kind of tag,which will not be there in all MP3 so using this will not make any sense.

 Answers

64

This should work for you, notice the getduration function: http://www.zedwood.com/article/127/php-calculate-duration-of-mp3

Wednesday, March 31, 2021
 
tplaner
answered 7 Months ago
52

Since I couldn't use the API route, I went with the RSS found at: http://www.new.facebook.com/minifeed.php?filter=11

And used the following PHP function, called StatusPress, with some of my own modifications, to parse the RSS feed for my Facebook status. Works great!

Wednesday, March 31, 2021
 
devo
answered 7 Months ago
16

Use array_slice() function:

$newArray = array_slice($originalArray, 0, 5, true);
Wednesday, March 31, 2021
 
motanelu
answered 7 Months ago
62

As you haven't mentioned your error I am considering a common error case undefined function

The error you get (undefined function) means the ID3 extension is not enabled in your PHP configuration:

If you dont have Id3 extension file .Just check here for installation info.

Saturday, May 29, 2021
 
Chvanikoff
answered 5 Months ago
83

You need a script to parse the mp3 file to acces to the data.

From google:
http://getid3.sourceforge.net
http://www.codediesel.com/pear/reading-mp3-file-tags-in-php/ ...

Saturday, May 29, 2021
 
christina
answered 5 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :