Archive for September, 2006

Working program driven enclosures in podcast feeds that iTunes will read.

Monday, September 11th, 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 its GET parameter, as you just tack a ? on the end

(cross-posted from http://colinmorris.wordpress.com)