View Single Post
  #11   Spotlight this post!  
Unread 03-12-2005, 16:50
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: FIRSTcast Episode 4 Released!

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?
__________________


Last edited by Ryan M. : 03-12-2005 at 17:18.
Reply With Quote