XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 21st, 2011, 01:41 PM
cesarcesar cesarcesar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 123 cesarcesar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 38 m 24 sec
Reputation Power: 9
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)

Code:
http://www.sitename.com/2011-03-14.mp3?px-hash%3Db42c227e36ef27aee6e96ae9c4f32214%26px-time%3D1300704254

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.

Code:
http://www.sitename.com/2011-03-14.mp3?px-hash=98c7759588a9add0728350dd69871cdf&px-time=1300731722


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.)

Reply With Quote
  #2  
Old March 21st, 2011, 02:17 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,686 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 3 h 11 m 41 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
If you're putting stuff in XML it has to be XML-encoded, not URL-encoded.
Code:
http://www.sitename.com/2011-03-14.mp3?px-hash=98c7759588a9add0728350dd69871cdf&px-time=1300731722

Note how the only thing needing encoding is the ampersand.

Quote:
Originally Posted by cesarcesar
I am placing this in the PHP sections because I think you all will know this answer the quickest.

Don't. The only reason something should go in the PHP forum is because the question is related to PHP. Yours was not.

Reply With Quote
  #3  
Old March 21st, 2011, 02:32 PM
cesarcesar cesarcesar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 123 cesarcesar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 38 m 24 sec
Reputation Power: 9
Yes you are correct. I just picked this up on another site. Thanks for the reply though.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML - urlencode - iTunes

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap