Quote:
|
Originally Posted by Adam Richards
Heh, sorry about that. I was trying to test out to see if iTunes would work with the redirect page to track the downloads. Turns out it doesn't, so I've gone back to directly linking to a regular file.
|
Actually, I meant the plain RSS feed. (Labeled "xml" in Adam's post.)
As a solution to allow the feed to work for podcatchers (like iTunes), but still maintain a mostly balanced server load, perhaps you could move the random server picking to the XML. Assuming you're currently hand creating the XML, the easiest way to do this is just put a special marker into the XML in place of where you want the server address/URL, then have a PHP file which reads in the XML, does a simple string search for the marker, replace the marker with a random server from an array, then send it on to the client.
To see what I mean, go to
http://traherom.homeunix.net/firstcast. feed.xml is the XML file I'm using as the base. (I copied the actual FIRSTCast one, then replaced "http://podcast.openfirst.org/finalcut/" with "&server_url;", an entity I just made up. It could have been anything. Also, because it's not a recognized entity, you'll get parse errors if you try to view it in your browser. Just view the source.) feed.php is the feed.xml processor, and view_source.php dumps the source of feed.php so you can see it.
The only problem that script has is that it doesn't check if the feed file was successfully opened, but that's easy to add. And I guess a little more randomness would be desirable, but with a longer server list, you should be fine.
--EDIT--
Oh, wait, is that feed just for iTunes?