Jump to content

Following redirect to a second URL


jakejarvis

Recommended Posts

Hi all,

 

I'm developing a site relating to YouTube videos. I currently have a function that retrieves the YouTube FLV URL. For example:

 

http://www.youtube.com/get_video?video_id=XC71t8GzqPs&t=OEgsToPDskJtI1jb1nE9xx9Ia-RxuCoh

 

However, this URL redirects to another URL that is the true location of the video file. For example, the above URL redirects to:

 

http://lax-v158.lax.youtube.com/get_video?video_id=XC71t8GzqPs

 

My Flash applet does not work if the function returns the non-redirected URL. Is there any way to make a function that follows the first URL and returns the true location of the video file (the second URL)?

 

Thanks in advance for any help.

Link to comment
https://forums.phpfreaks.com/topic/48206-following-redirect-to-a-second-url/
Share on other sites

Archived

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

×
×
  • 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.