Before you start
- You need a webserver
- Your webserver needs to support PHP
- Put all your podcast episodes in one subdirectory
- Decide on a logical naming convention for your podcast episodes, this will make things a lot easier for you later on.
Example: nilicule-tech_rework_001.mp3 - Grab this ZIP file, which contains the script that will build our iTunes XML for us later on.
Preparing your podcast section on your website
An iTunes podcast is little more than an XML file that exists on your website and which gets read by both Apple as well as users who subscribe to your podcast. You don't have to make a pretty webpage, but we will set up a little folder where all the podcast files are going to reside.
As an example we'll assume that your website is located in the folder /var/www/website.com.
- Create a folder called podcast inside your /var/www/website.com/ folder
From inside that podcast folder, do the following things:
- Create a folder called mp3 for your MP3 files and playlists
- Create a folder called xml where the iTunes XML file will end up
- Extract the contents of the dir2cast.zip archive into /var/www/website.com/podcast/
- Edit the file /var/www/website.com/podcast/dir2cast/dir2cast.ini and make sure you change all the necessary settings. If you plan on uploading new episodes of your show by dropping an MP3 files on the server together with a playlist, then make sure you point MP3_BASE to the location where you'll put your MP3 files. Pay close attention to the PODCAST_XML variable as well - for our example it should be set to /var/www/website.com/podcast/podcast.xml so that the eventual iTunes XML file will be online at http://www.website.com/podcast/xml/podcast.xml
Making two folders writeable for the script
Since the dir2cast script will write a new copy of your podcast XML file to disk, you'll have to make sure that the /var/www/website.com/podcast/xml and /var/www/website.com/podcast/dir2cast/temp folders are writeable. In the FTP program you use for updating the site, look for 'file permissions' for those folders and set those permissions to allow overwriting of the data.
Where are we now?
You should now have the following directory structure on your server:
Directory name | What's in there? |
---|---|
/var/www/website.com | The place where it all started |
/var/www/website.com/podcast/ | All podcast related things will be in here |
/var/www/website.com/podcast/dir2cast/ | The script that will create the iTunes XML files |
/var/www/website.com/podcast/dir2cast/temp/ | Location for some temporary files needed by dir2cast |
/var/www/website.com/podcast/mp3/ | This is where you'll put all your MP3 files and playlists |
/var/www/website.com/podcast/xml/ | This is where your iTunes XML file will end up |
Naming your MP3 files and playlists
The dir2cast script assumes that you name your podcast episodes in a logical fashion. The FILE_FILTER variable in dir2cast.ini defines what naming convention dir2cast will be assuming. Picking something like nilicule-tech_rework_001.mp3 for the first episode and nilicule-tech_rework_002.mp3 for the second episode makes things very, very easy.
iTunes will allow you to show a little information box next to each episode and that's a perfect location for a tracklisting. Make sure your tracklisting filename matches your podcast episode. For example: nilicule-tech_rework_001.txt
Making sure dir2cast creates the XML file
Now we get to the more interesting bit of this tutorial: making sure that dir2cast creates that shiny XML file that Apple needs!
Test if all your hard work paid off by opening a webbrowser and going to the dir2cast script that should be located at http://www.website.com/podcast/dir2cast/dir2cast.php
If you get any errors, make sure that all the paths in the dir2cast.ini file are correct and that the xml/ and dir2cast/temp folders are writeable. Fix the errors and run the dir2cast.php script again.
If you do not get any errors than you should now have a valid iTunes XML file waiting for you at http://www.website.com/podcast/xml/podcast.xml
Time to submit the podcast to iTunes!
You'll need iTunes installed to submit a podcast to Apple. Submitting your podcast is pretty straightforward - just go to this page. iTunes will be opened and you should see the podcast submission page right in front of you.
If for whatever reason you don't see the submission page, then just go to the iTunes Store, click on 'podcasts' in the iTunes Store top menu and select 'Submit podcast' from the shortcut menu on the right side.
In the submission for you post the link to the XML file that dir2cast generated for you and within a couple of days Apple will approve your podcast.
Do I have to do all of this for every episode of my podcast?
Absolutely not! The next time this is all you'll have to do:
- Upload the episode to /var/www/website.com/podcast/mp3/
- Place the tracklisting in the same location with a similar name (just ending with .txt)
- Open http://www.website.com/podcast/dir2cast/dir2cast.php in your browser
- Done!