Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $id=$a['id'];
- $dt=file_get_contents("http://www.youtube.com/get_video_info?video_id=$id&asv=3&el=detailpage&hl=en_US");
- $x=explode("&",$dt);
- $t=array(); $g=array(); $h=array();
- foreach($x as $r){
- $c=explode("=",$r);
- $n=$c[0]; $v=$c[1];
- $y=urldecode($v);
- $t[$n]=$v;
- }
- $streams = explode(',',urldecode($t['url_encoded_fmt_stream_map']));
- foreach($streams as $dt){
- $x=explode("&",$dt);
- foreach($x as $r){
- $c=explode("=",$r);
- $n=$c[0]; $v=$c[1];
- $h[$n]=urldecode($v);
- }
- $g[]=$h;
- }
- //print_r($g);
- echo '<div style="clear:both;margin-bottom:10px;">';
- echo '<span class="vd">DOWNLOAD VIDEO</span>';
- foreach($g as $format)
- {
- $type = explode(';',$format['type'] );
- $types = $type[0];
- $size = formatBytes(get_size($format['url']));
- echo '<span class="vd"><a target="_blank" href="'.urldecode($format['url']).'">'.$size.'</a></span>';
- }
- echo '</div>';
- ?>
Add Comment
Please, Sign In to add comment