PHP Get youtube video with 1440p quality

PHP Get youtube video with 1440p quality

youtube

Tôi đã thử mã sau đây để tải youtube với tất cả các chất lượng và chỉ đạt đến 720p là chất lượng cao nhất ngay cả khi video hỗ trợ chất lượng cao hơn

function get_youtube($code)
{
    $data = file_get_contents('http://youtube.com/get_video_info?video_id=' . $code . '&el=vevo&fmt=18&asv=2&hd=1');
    parse_str($data , $details);
    foreach (explode(',' , $details['url_encoded_fmt_stream_map']) AS $quality) {
        parse_str($quality , $video);
        echo '<pre>';
        print_r($video);
        echo '</pre>';
    }


}

get_youtube('kgs1u-6ASqk');

Bạn có thể tải video YouTube với chất lượng 1080p trở lên

function get_youtube($code)
{
    $data = file_get_contents('http://youtube.com/get_video_info?video_id=' . $code . '&el=vevo&fmt=18&asv=2&hd=1');
    parse_str($data , $details);
    $my_formats_array = explode(',' , $details['adaptive_fmts']);
    $avail_formats[] = '';
    $i = 0;
    $ipbits = $ip = $itag = $sig = $quality_label = '';
    $expire = time();
    foreach ($my_formats_array as $format) {
         parse_str($format);
         $avail_formats[$i]['itag'] = $itag;
         $avail_formats[$i]['quality'] = $quality_label;
         $type = explode(';', $type);
         $avail_formats[$i]['type'] = $type[0];
         $avail_formats[$i]['url'] = urldecode($url) . '&signature=' . $sig;
         parse_str(urldecode($url));
         $avail_formats[$i]['expires'] = date("G:i:s T", $expire);
         $avail_formats[$i]['ipbits'] = $ipbits;
         $avail_formats[$i]['ip'] = $ip;
         $i++;
     }
     var_dump($avail_formats);
}
get_youtube('kgs1u-6ASqk');
https://severphim.blogspot.com/2017/07/php-get-youtube-video-with-1440p-quality.html

Nhận Xét Facebook

Chờ xíu nhé...

Nhận Xét Blogger

Hiện tại có 2 bình luận
  1. blank
    Nặc danh17:35 6/10/17

    Gái xinh dâm đãng móc lồn thủ dâm phim sex vietnam Là một cô gái khá xinh đẹp và dâm đãng nhưng em vẫn chưa

    Trả lờiXóa
  2. blank
    Nặc danh17:36 6/10/17

    có người yêu, hàng ngày Hằng ngoài việc móc của xem phim sex của mình thì luôn quyến rũ các chàng trai để được

    Trả lờiXóa