Working Program Driven Enclosures in Podcast Feeds that iTunes will Read.
September 22, 2006
Problem
iTunes’ podcasting application refuses enclosures that do not end in an extension that it can recognise as an understandable file format. Example:
- http://myhost/site/myfile.mp3 GOOD
- http://myhost/site/myfile.php?file=141 BAD
So if you’re serving files from a database via an application, you’re out of luck no matter what headers you send.
Solution
Add a filename and additional question mark to the end of the URI:
- http://myhost/site/myfile.php?file=141&filename.mp3?
(This is made easier if your php file has the filename.mp3 as it’s get parameter, as you just tack a ? on the end)