Want an easy way to generate a podcast or RSS feed? At Eliot’s request, I wrote a PHP script that generates an RSS feed based on the contents of its parent directory, so whenever you add files to that directory (or its subdirectories), the feed is updated with links to those files. It also supports enclosures, so if you add an audio or video file to the directory, that file will be available to podcast clients. If you modify a file in the directory, the feed updates the link so that subscribers will see that it has changed. It’s a no-fuss way to syndicate content without having to tie it into a CMS like WordPress or TypePad.
Here’s how to use it:
- Save this file as EasyFeed.php (or dir.php or feed.php, it doesn’t really matter).
- Copy it to a directory on your webserver.
- Subscribe to the feed with any RSS or podcasting client.
That’s all there is to it. For example, here’s the feed of all of the files I’ve ever uploaded for use in my blog. If you subscribe to that feed with iTunes, you’ll see that I’ve uploaded two audio files: programming.mp3 and calacanis.mp3. iTunes will automatically download them, as well as any other audio/video files I upload. No fuss, no muss.