March 21st, 2011, 02:41 PM
XML - urlencode - iTunes
I am placing this in the PHP sections because I think you all will know this answer the quickest. I am creating a podcast. I have created the XML file successfully. I have placed the file on my server and have gotten one of my podcast clients (Media Monkey) to pick it up and the mp3 files within it successfully. My issue is that when i try an get iTunes to work with it there is problems. iTunes will read the XML, but will not download the mp3's. I'm pretty sure I know why, but there is a huge catch-22 in the deal.
To protect my content my CDN offers a method by where I add some query parameters to the end of the mp3 file to protect it from illegal downloads. It look like this (not actual file)
Using this string in the XML makes it validate correctly. The issue is because this link is urlencoded, the XML validates, but iTunes will not process the link as a valid link. Now if I remove the urlencoded part of the link, the XML will not validate and then iTunes will not even read the XML file. This is the link without encoding.
See where I'm going? Anyone have a solution? How do I get around this catch-22? I need a way to pass the un-encoded link in the XML file, but still make it validate. Thanks for your help.
(yes i see the links are different. Its ok as an example.)
March 21st, 2011, 03:17 PM
If you're putting stuff in XML it has to be XML-encoded, not URL-encoded.
Note how the only thing needing encoding is the ampersand.
Don't. The only reason something should go in the PHP forum is because the question is related to PHP. Yours was not.
Originally Posted by cesarcesar
March 21st, 2011, 03:32 PM
Yes you are correct. I just picked this up on another site. Thanks for the reply though.