...

View Full Version : Determine .mp3 length (time) with PHP?



madmatter23
03-16-2008, 08:28 PM
Hi,

I'm creating an RSS feed using PHP and I've added all of the XML tags necessary except for the <itunes:duration> tag, which is necessary for submission to iTunes.

I used PHP's filesize() function to determine each enclosure's file size, but I'm wondering if there is any PHP function, or perhaps a method of combining PHP with another language, that would determine the playtime of a particular file. I'm also wondering if there are any such methods for other file types, like .mov or .swf.

Just looking to be pointed in the right direction, I'm not sure where to start.

Thanks

Inigoesdr
03-16-2008, 08:59 PM
You could try this project (http://getid3.org/).

madmatter23
03-16-2008, 09:09 PM
Wow. That's extremely helpful, exactly what I needed. Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum