Technology
From the Trenches

Creating iTunes Feeds with PHP

Friday, March 6th, 2009

Feed I recently set up an RSS-like feed for use with the iTunes store, for distributing media files as a podcast (or “vodcast”). I did some searching for existing PHP scripts to accomplish this, and came across Anis uddin Ahmad’s Universal Feed Writer classes. They can be used to create RSS1, RSS2 and ATOM feeds. I extended his classes so that they can produce iTunes feeds as well, which is a major departure from standard RSS (it has it’s own DTD). I’ll send them to Mr. Ahmad too, in case he wants to add my updates to his files. He didn’t specify any license, but did mention “Share and Enjoy” at the bottom of his blog post, so I’ll do the same: Share and Enjoy! Without warranty of any kind. :)

Here are the files.

The iTunes extensions to RSS2 are helpfully specified by Apple. The process of getting the feed set up and into iTunes is laid out in four easy steps by Derik Whittaker. Note that you can create an URL that will open in iTunes so that it connects directly to your site (without going through the iTunes Store), using this format: itpc://FEEDURL.

Tags: , , , , , , , , ,

Apache2, PHP and MySQL on Mac OSX

Monday, July 24th, 2006

I recently setup the so-called “MAMP” (MacOSX, Apache2, MySQL and PHP) on my laptop, so I can have a portable web development environment. I decided to use MacPorts (formerly DarwinPorts) for Apache2 and PHP5, which makes things a lot easier. There were a few “gotchas” though, so I thought I’d share what I learned. If you want an installation completely based on MacPorts builds, this site has some good instructions.

MySQL Preference Panel I went with the binary installation package from MySQL.com, instead of using the MacPorts version, for aesthetic reasons: it comes with a cool preference panel component for starting and stopping the server (click the thumbnail to the right for a larger image). Using this version instead does require a slight tweak to get the MacPorts packages to link to it, but its easy to do.

(more…)

Tags: , , , , , ,