Jump to content

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:

[b]http://media.libsyn.com/podcastname/episode1.mp3[/b]

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:

[b]http://dt5w4asdf234.cache.libsyn.com/media/podcastsname/episode1.mp3[/b]

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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.