Jump to content


Photo

Dealing with Cache Networks/File Redirectors


  • Please log in to reply
No replies to this topic

#1 ckohler

ckohler
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 04 May 2006 - 09:05 PM

I'm new to PHP and am only a marginally intermediate level programmer. I'm wrighting some PHP scripts that deal with handling various podcast RSS feeds.

One thing I've discovered is that many podcasts keep their actual .MP3 or video files hosted on caching networks like libsyn.org and such. What this means is that the url to the .mp3 file might be something like:



But... if you go to that address in a web browser, you actually end up being forwarded (sometimes several times) to where the actual file can be had which might be something like:



This dynamic forwarding allows the user to keep the same URL for their files while the caching network can redirect downloaders to various networks/systems to manage bandwidth and such.

Now.. here is my question:

How do I script PHP to be able to follow the path these caching networks have laid out to find the real file?

I'm guessing that when I request the file from the static URL, they must return something to tell my browser to look someplace else.. then somplace else.. until finally I get the file. Is there some kind of function or technique for figuring this out?

Thanks a bunch.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users