Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function yout_downl2($yout_video_id, $type =false, $vid_title=false){
- $outp = '<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><style>a {display:block;text-align:center; background-color:#e7e7e7;border-radius:5px; }</style></head><body>
- <div class="fanj" align="center" style="width:600px;margin:0 auto;">
- <br/>https://www.youtube.com/watch?v='.$yout_video_id.' ( Alternative Download ):';
- if ($type=='video'){
- $outp .= '<br/>
- <br/><a target="_blank" href="http://www.clipconverter.cc/?ref=bookmarklet&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D'.$yout_video_id.'">2) clipconverter.com</a>
- <br/><a target="_blank" href="http://savefrom.net/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D'.$yout_video_id.'">3) saveFrom.net</a>
- <br/><a target="_blank" href="http://www.fullrip.net/video-m/'.$yout_video_id.'">4) fullrip.net</a>
- ';
- //http://www.convertfiles.com/
- //freefileconvert.com
- }
- elseif ($type=='audio'){
- $outp .= '<br/>
- <br/><a target="_blank" href="http://www.youtube-mp3.org/?e=s_exp&r=true#v='.$yout_video_id.'">1) youtube-mp3.org</a>
- <br/><form style="display:none;" action="http://convert2mp3.net/en/index.php?p=convert" name="frm1" method="post"><input name="url" value="https://www.youtube.com/watch?v='.$yout_video_id.'" type="text" /> <input name="format" value="mp3" type="text" /><input name="85tvb5" value="242433" type="text" /><input type="submit"></form> <a href="javascript:document.forms[\'frm1\'].submit();">2) convert2mp3.net</a>
- <br/><a target="_blank" href="http://www.clipconverter.cc/?ref=bookmarklet&url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D'.$yout_video_id.'">3) clipconverter.com(MP3)</a>
- ';
- //$result = get_remote_data('http://www.force-download.net/getDlLink.php', 'video_url=https://www.youtube.com/watch?v='.$yt_ID); preg_match('/%3Cbr%2F%3E(.*?)\<\/link\>/si',$result,$n); $AUDIO_FILE = urldecode($n[1]).'&title='.$yt_titl.'.mp3';
- }
- $outp .=
- '</div>
- <div style="margin:50px 0 0 0; font-style:italic; font-size:13px;">Other download sites: ytconv.net, online-convert.com, fullrip.net, 2conv.com </div>
- </body></html>';
- return $outp;
- }
- public function yout_DownUrls($viid_id, $titlee='') {
- $full_info = get_youtube_data($viid_id);
- if (!empty($full_info['url_encoded_fmt_stream_map'])) {
- $streams = explode(',',$full_info['url_encoded_fmt_stream_map']); //echo '<pre>';print_r($streams);echo '</pre>';exit;
- foreach($streams as $stream){
- parse_str($stream, $data);
- if(stristr($data['type'], "video/mp4") && $data['quality']=="medium"){
- if(empty($titlee)) {$titlee= !empty($data['title']) ? urlencode($data['title']) : (!empty($full_info['title']) ? urldecode($full_info['title']) :'youtube_file');}
- $vidLink= urldecode($data['url']).'&title='.$titlee.'_'; break;
- //$linkk = $data['url'].'&signature='.$data['sig']; //$linkk="http://127.0.0.1:8182/MVI_1356_1.mp4";
- //$json_output = file_get_contents(trim("http://gdata.youtube.com/feeds/api/videos/".$viid_id."?v=2&alt=json"));
- //$json = json_decode($json_output, true);
- //$video_description = $json['entry']['media$group']['media$description']['$t'];
- //$video_counts = $json['entry']['yt$statistics']['viewCount'];
- //$video_title3 = urlencode($data['title']);// urlencode($json['entry']['title']['$t']);
- //$final_url = urldecode($linkk). '&title='.$video_title3.'';
- //$file = fopen('video.'.rand (100, 1000000).str_replace($format,'video/','').".mp4",'w');
- //stream_copy_to_stream($video, $file); //fclose($video); readfile($file); //break;
- }
- }
- } else {$vidLink= false;}
- if (!empty($full_info['adaptive_fmts'])) {
- $streams = explode(',',$full_info['adaptive_fmts']); //echo '<pre>';print_r($streams);echo '</pre>';exit;
- foreach($streams as $stream){
- parse_str($stream, $data); if(stristr($data['type'], "audio/mp4")){ $audLink= urldecode($data['url']).'&title='.$titlee.'_'; break;}
- }
- } else {$audLink= false;}
- return array('vid'=>$vidLink,'aud'=>$audLink,'title'=>$titlee);
- }
Add Comment
Please, Sign In to add comment