Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
PHP YouTube FLV #143
PHP YouTube FLV #143
Comments
|
It looks like you're not using youtube-dl at all, but writing a similar application in php. Therefore, this is not a valid bug report for youtube-dl. However, you're in luck: youtube-dl can print out the download URL you're currently calculating in php, with the
From php, you can use this functionality like this:
If this fails for any youtube URLs, please file a new bug report, and include:
Thanks! |
|
Thanks! But i wan't to try if this is working so. $get_youtube_src = file_get_contents('http://www.youtube.com/get_video_info?video_id='.$yt_video_id.'&fmt=18'); if (eregi('url_encoded_fmt_stream_map',$get_youtube_src)) Normaly in $complete should be they right url? Or can you help me an tell me if the code here is correct to CATCH the right url in the get_video_info from youtube? |
|
This belongs in a stackoverflow question, not a youtube-dl bug report. |
Hello Guys, i hope you can help me, i'm using youtube-dl since 1 year. I wanna try to parse the flv url trow php now.
$yt_video_id = "ID";
$check_status = curl_init('http://www.youtube.com/get_video_info?video_id='.$yt_video_id.'&fmt=18');
curl_setopt($check_status, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($check_status, CURLOPT_RETURNTRANSFER, true);
$get_youtube_src = curl_exec($check_status);
curl_close($check_status);
if (eregi('url_encoded_fmt_stream_map',$get_youtube_src))
{
$vidUrl = end(explode('url_encoded_fmt_stream_map=',$get_youtube_src));
$vidUrl = urldecode(urldecode(current(explode('&',$vidUrl))));
$vidUrl = current(explode(';',$vidUrl));
$vidUrl = urldecode(end(explode('url=',$vidUrl)));
$complete = $vidUrl;
echo "complete";
The $complete should be the Download Url, but sometimes it isn't working. Can you tell me why? From 10 Videos, 8 isn't working 2 is working?
regards mike