• 25-01-2008, 13:47:15
    #1
    Arkadaşlar elimde hazır bir kod vardı, youtube kendi bünyesinde epeyce değişiklik yaptı haliyle download işlemide suya düştü.

    <?php
    $vid = "VgQMTLKmwrA";
    				function get_content_of_url($url)
    				{
    						$ohyeah = curl_init();
    						curl_setopt($ohyeah, CURLOPT_RETURNTRANSFER, 1);
    						curl_setopt($ohyeah, CURLOPT_URL, $url);
    						$data = curl_exec($ohyeah);
    						curl_close($ohyeah);
    						return $data;
    				}
    				function get_flv_link($string)
    				{
    						if (eregi("watch_fullscreen\?video_id=(.*)&title=", $string, $out))
    						{
    								$outdata = $out[1];
    						}
    						return 'http://youtube.com/get_video.php?video_id=' . $outdata;
    				}
    				function get_http_header($url)
    				{
    						$uh = curl_init();
    						curl_setopt($uh, CURLOPT_URL, $url);
    						curl_setopt($uh, CURLOPT_HEADER, 1);
    						curl_setopt($uh, CURLOPT_RETURNTRANSFER, 1);
    						$res = curl_exec($uh);
    						curl_close($uh);
    						return $res;
    				}
    				function show_url($http_header)
    				{
    						$arai = explode("\n", $http_header);
    						foreach ($arai as $ini)
    						{
    								if (eregi("location", $ini))
    										$url = $ini;
    						}
    						list($sampah, $hasil) = explode("Location:", $url);
    						return str_replace("\n", "", trim($hasil));
    				}
    				function download_youtube($url)
    				{
    						$data = get_content_of_url($url);
    						$next_url = get_flv_link($data);
    						$data = get_http_header($next_url);
    						return show_url($data);
    				}
    				// End YouTube functions
    				// ---------------------------------------------------------------------------
    				$vurl = 'http://youtube.com/watch?v=' . $vid;
    				error_reporting(0); // <-- to eliminate error report
    				ini_set("max_execution_time", 0); // <-- to avoid operation timed out
    				$dyt = download_youtube($vurl); // Returns a result like: http://cache.googlevideo.com/get_video?video_id=lSeazwhILo4&origin=dal-v53.dal.youtube.com
    				if (strlen($dyt) >= 87)
    				{
    						$youtube_server = trim(substr($dyt, 67, 999)); // Let's pull the server out of the code, for example:  dal-v53.dal.youtube.com
    				}
    				else
    				{
    						$youtube_server = str_replace('/', '', substr($dyt, 7, 24));
    				}
    				$vidfinal = 'http://' . $youtube_server . '/get_video?video_id=' . $vid; // Now let's format it properly, example: http://ash-v357.ash.youtube.com/get_video?video_id=lSeazwhILo4';
    				
    				echo "$vidfinal";
    				
    ?>
    nasıl dücenleyeceğim yardımcı olurmusunuz.
  • 25-01-2008, 16:37:15
    #2
    evet aynen bozuldu. düzeltebilecek varmı

    <?php
    
    if (isset($_GET{'url'})){
        $url=$_GET{'url'};
        $url=trim($url);
    
        if (strstr($_GET['url'],"youtube.com")){
            $data = @file_get_contents($_GET['url']);
            @preg_match('#/watch_fullscreen\?video_id=([a-z0-9-_]+)&l=([0-9]+)&t=([a-z0-9-_]+)#i', $data, $matches);
            if (ereg($matches[1], $_GET['url'])) {
                Header("Location: http://www.youtube.com/get_video?video_id=$matches[1]&l=$matches[2]&t=$matches[3]");
            } 
        }
    
    ?>
  • 25-01-2008, 16:39:33
    #3
    Üyeliği durduruldu
    evet değişti sistem Tr de bir siede çalışanını gördüm bende diğerleri gitmiş galiba
  • 25-01-2008, 16:41:17
    #4
    evet snare senin sitede çalışıyor
  • 25-01-2008, 16:43:42
    #5
    Üyeliği durduruldu
    Ben bişey demedim
    yAyAmAz adlı üyeden alıntı: mesajı görüntüle
    evet snare senin sitede çalışıyor
  • 25-01-2008, 16:53:20
    #6
    youtubekaydet calisiyor, sahibi youtube'deki gelismeleri yakindan takip ediyior galiba!
  • 25-01-2008, 17:38:59
    #7
    çok değişiklik yapmışlar, resim adreslerinide değiştirmişler.
  • 25-01-2008, 17:50:37
    #8
    yokmu düzeltebilecek biri
  • 25-01-2008, 19:02:25
    #9
    bu sorunu ben de yaşadım bugün bir sıradan youtube videosu indirecektim her yer hata verip durdu. Hepsi de 10. satırdaydı sanırsam.
    Snare'in siteyi kullanalım bari

    edit: snare in site de çalışmıyor hatta videoları değil kod halini gösteriyor yazılarında