Jump to content


This topic is now archived and is closed to further replies.


Dealing with Cache Networks/File Redirectors

Recommended Posts

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:

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

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.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.