• 10-08-2009, 18:18:33
    #1
    Evet arkadaşlar, biliyorsunuz forumda birkaç gündür bunun hakkın da birçok yorum yazıldı çizildi ama biri çıkıpta çalışan düzgün bir kod vermedi, kimi fix olmadan çalışmaz dedi, kimi 100 TL dedi, kimi kapak olsun dedi ama kod vermedi, ama ben size ne DNS adresine nede Proxyyeihtiyaç olmadan çalışan youtube kodlarını veriyorum. Daha önce bu konu hakkında (Youtube videoları) bir çalışmam olmadığı için çalışma mantığı biraz ters gelebilir, hatta bazı hatalarda olabilir, ama sonuçta taş gibi çalışan bir bot, botu ben kendime göre düzenlediğim için sizin uygulamalarınıza uygun olmayabilir, bunun için konu altına yazarsanız botu size uygun yapmaya çalışırız..

    Botun özellikleri...

    * Bot video id aldıktan sonra video datasını çekip içindeki formatlara bakıyor, birkaç günlük araştırmadan sonra youtube'n 5 farklı format kullandığını gördüm, eğer daha farklı formatlar da varsa onlarıda ekleriz.

    * Formatlara baktıktan sonra varolan formatların tümünün linklerini alıyor, örneğin HD, flv, MP4 varsa o formatların hepsini listeliyor.

    * Videonun adresini aldıktan sonra video serveri kontrol ediliyor, örneğin v1.lscache7.c.youtube.com
    Daha sonra bu serverin ip adresini bir fonksiyon yardımı ile bulup server adıyla yer değiştiriyoruz ve video linkinin adresini veriyoruz.

    * Sayfayı iki türlü hazırladım, POST metoduyla kullanmak isterseniz olduğu gibi kalsın, yani bir forma adresi girip gönder diyerek linkleri alabilirsiniz.

    * GET metodu ile kullanmak isterseniz de yorum satırlarını kaldırarak kullanabilirsiniz, ama bu seferde POST metodunun önünde bulunan kısma yorum satırlarını eklemeniz gerekir. Çünkü iki yöntem aynı anda çalışamaz.

    * Botu ilk önce CURL ile yazmayı düşündüm, ama sonra hem herkesin hostinginde olmaması hemde PHP nin kendi kütüphanelerinin yeterli olması sebebi ile file_get_content kullandım.

    * Bot biraz yavaş çalışabilir, bunun sebebi ve hızlandırma olayı için şöyle yapabilirsiniz...

    - Bot headerstatus fonksiyonu ile videonun olup olmadığını kontrol ediyor, video yoksa false döndürüyor. İsterseniz bu durumu bilginiz dahilinde kaldırabilirsiniz.

    - Video serverin ip adresini sorguluyor, bu işlem bilgisayarında dns kayıtlı olmayan kullanıcılar için gereklidir. IP adresi için başka bir siteye bağlanıyor, ama kendi serverinizde bulunduracağınız bir liste ile de bu sorgulama işlemini kaldırabilirsiniz..

    - Ve en önemlisi de aynı anda 5 adet video tipi sorgulanıyor, kullanmayacağınız video tiplerini kaldırarak büyük bir hız artışı elde edebilirsiniz.


    Dediğim gibi, Youtube video ile ilgili ilk kez bir kod yazıyorum, yöntemler yanlış olabilir, kendi kodunuza uymamış olabilir ama çok rahatlıkla istediğiniz yeri değiştirebileceğiniz bir kod, yani anlaşılmayacak bir kod değil...

    Bu arada bu kod hiçkimseye kapak olmasın, herkes istediği gibi kodları değiştirebilir, kendisininmiş gibi yayınlayabilir, satabilir (100 TL den fazla olmasın ), kullabilir, lisans yada kullanım hakkı gibi şeyleri yoktur. Şimdilik tam 156 satır ve bedava (yorum satırları para etmez ama ).

    Siz de fikirlerinizi belirtiniz ki bu kodu şekillendirelim, ortaya güzel bişey çıksın, herkes yararlansın.

    Son birşey daha, video resmi için;

    $videoresmi = 'http://i.ytimg.com/vi/'.$videoid.'/hqdefault.jpg';
    Kullanabilirsiniz.

    Video süresi, video başlığı, etiketler gibi kısımlar bir dahaki versiyonda olabilir..


    <?
    #######################################################################
    ##
    ## Advanced Youtube Bot V.1.0
    ## Author : Enigmatic
    ## Mail and MSN Address : enigmatic[x]live.com
    ## 
    ## You're not needed DNS or Proxy server for bot, videos are
    ## getting directly under from Youtube IP Address..
    ##
    ## You can change are codes and use unauthorized, no license required.
    ##
    #######################################################################
    
    // Functions
    function getvideourl($rawlink){
    preg_match('#http%3A%2F%2F(.*?)%2Fvideoplayback#si',$rawlink,$server);
    $getip = file_get_contents('http://tools.web-max.ca/findwebsitesip.php?domain='.$server[1]);
    preg_match('#<img src="images/arrow-down.gif" align="absmiddle">&nbsp;(.*?)</a><br>#si',$getip,$rawip);
    $ip=trim(strip_tags($rawip[1]));
    $rawlink=urldecode(str_replace($server[1],$ip,$rawlink));
    return $rawlink;
    }
    
    function headerstatus($link){
    $control = get_headers($link);
    $link=$control[0];
    return $link;
    }
    
    
    /*
    /
    / Kullanmak istedğiniz metodun önündeki yorum işaretlerini
    / kaldırın, iki metoddan aynı anda birini kullanabilirsiniz.
    / Kullanmadığınız metodun önüne yorum işareti koymalısınız.
    /
    */
    
    ##################################################################
    ## GET metodu Başlangıç
    ## Kullanım şekli: youtube.php?videourl=http://www.youtube.com/watch?v=fFDcaTI0cl8
    ##################################################################
    
    // if(empty($_GET['videourl']))
    // {
    // echo "Lütfen bir video linki girin...";
    // }
    // else
    // {
    // $videourl = strip_tags($_GET['videourl']);
    
    ##################################################################
    ## GET metodu Bitiş
    ##################################################################
    
    
    ##################################################################
    ## POST metodu Başlangıç
    ##################################################################
    if(empty($_REQUEST['do'])){ // Form start
    echo '
    <form method="POST" action="'.$_SERVER['PHP_SELF'].'?do=video">
    Video Url : <input type="text" name="videourl">
    <input type="submit" name="submit" value="Videoyu İndir"></form>
    ';
    }
    
    if($_REQUEST['do']=='video'){ 
    $videourl = strip_tags($_POST['videourl']);
    ##################################################################
    ## POST metodu Bitiş
    ##################################################################
    
    // Başlıyoruz..
    if(empty($videourl)){
    echo 'Lütfen bir video adresi giriniz...';
    exit;
    }
    //print $videourl;
    $videoid=explode('v=',$videourl);
    $videoid=substr($videoid[1],0,11);
    //print $videoid;
    $videodata=file_get_contents('http://208.117.236.69/get_video_info?&video_id='.$videoid);
    if(strstr($videodata,'status=fail&errorcode')){
    echo 'Bu videoda embed kodu deaktiftir.';
    exit;
    }
    //$videodata=urldecode($videodata);
    //print $videodata;
    preg_match('#fmt_map=(.*?)&#',$videodata,$formatmap);
    //print $formatmap[1];
    
    /// FLV NORMAL
    if(strstr($formatmap[1],'5%2F0%2F7%2F0%2F0')){
        preg_match('#%2C5%7C(.*?)&allow_ratings#',$videodata,$flvn);
        if(headerstatus(getvideourl($flvn[1]))=='HTTP/1.1 200 OK'){
    //print $flvn[1];
        echo '<a href="'.getvideourl($flvn[1]).'">FLV NORMAL</a><br />';
        }else{
                preg_match('#%2C5%7C(.*?)&allow_ratings#',$videodata,$flvn);
                    echo '<a href="'.getvideourl($flvn[1]).'">FLV NORMAL DIGER</a><br />';
    
        }
    }
    
    /// FLV QUALITY
    if(strstr($formatmap[1],'34%2F0%2F9%2F0%2F115')){
        preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
        if(headerstatus(getvideourl($flvq[1]))=='HTTP/1.1 200 OK'){
    //print $flvq[1];
        echo '<a href="'.getvideourl($flvq[1]).'">FLV QUALITY</a><br />';
        }else{
                preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
                    echo '<a href="'.getvideourl($flvq[1]).'">FLV QUALITY DIGER</a><br />';
        }
    }
    
    /// MP4 Normal
    if(strstr($formatmap[1],'22%2F2000000%2F9%2F0%2F115%2C')){
        preg_match('#22%7C(.*?)%2C#',$videodata,$mp4n);
        if(headerstatus(getvideourl($mp4n[1]))=='HTTP/1.1 200 OK'){
    //print $mp4n[1];
        echo '<a href="'.getvideourl($mp4n[1]).'">MP4 Normal</a><br />';
        }else{
                //preg_match('#34%7C(.*?)%2C#',$videodata,$mp4n);
                //echo '<a href="'.getvideourl($mp4n[1]).'">MP4 Normal DIGER</a><br />';
        }
    }
    
    /// MP4 HQ
    if(strstr($formatmap[1],'18%2F512000%2F9%2F0%2F115')){
        preg_match('#18%7C(.*?)%2C#',$videodata,$mp4hq);
        if(headerstatus(getvideourl($mp4hq[1]))=='HTTP/1.1 302 Found'){
    //print $mp4hq[1];
        echo '<a href="'.getvideourl($mp4hq[1]).'">MP4 HQ</a><br />';
        }else{
                //preg_match('#34%7C(.*?)%2C#',$videodata,$mp4hq);
                    //echo '<a href="'.getvideourl($mp4hq[1]).'">MP4 HQ DIGER</a><br />';
        }
    }
    
    /// HD Stereo
    if(strstr($formatmap[1],'35%2F640000%2F9%2F0%2F115')){
        preg_match('#35%7C(.*?)%2C#',$videodata,$hds);
        if(headerstatus(getvideourl($hds[1]))=='HTTP/1.1 302 Found'){
    //print $hds[1];
        echo '<a href="'.getvideourl($hds[1]).'">HD Stereo</a><br />';
        }else{
                //preg_match('#34%7C(.*?)%2C#',$videodata,$hds);
                    //echo '<a href="'.getvideourl($hds[1]).'">HD Stereo DIGER</a><br />';
        }
    }
    }
    
    ?>
    JW player ile aşağıda eklediğim dosyadaki gibi bir kullanım yapabilirsiniz, kabaca birşey yaptım şimdilik, örnek olsun açısından daha detaylısını istek olursa yaparız..

    http://rapidshare.com/files/26587872..._jw_player.zip
  • 10-08-2009, 18:26:23
    #2
    Üyeliği durduruldu
    ne youtube muş
  • 10-08-2009, 18:53:38
    #3
    Enigmatic kardeş,

    http://www.icgqatar.biz/acar.php?vid...?v=CZU5GXoRM6k

    burdaki gibi acar.php yi upload edip indirme linki paylaşabilirmisin? verdiğin kodları kullanamadım

    konu için çok sağol
  • 10-08-2009, 19:05:41
    #4
    güzel bir çalışma tebrikler ama her seferinde ip sorgulatmak yerine keşke script içine yazsaydınız ipleri.

    çokta güzel çalışıyor, tekrar tebrikler...

    http://www.klipdunyasi.com/proxytest/yt.php
  • 10-08-2009, 19:36:46
    #5
    S7V7N adlı üyeden alıntı: mesajı görüntüle
    Enigmatic kardeş,

    http://www.icgqatar.biz/acar.php?vid...?v=CZU5GXoRM6k

    burdaki gibi acar.php yi upload edip indirme linki paylaşabilirmisin? verdiğin kodları kullanamadım

    konu için çok sağol
    Önce GET metodu için yorum satırlarını kaldır ve post metodu önüne yorum işareti koy.

    Sonra 94. satır dahil 153. satıra kadar (153 dahil) hepsini sil şu kodu ekleyip kaydet.

    /// FLV QUALITY
    if(strstr($formatmap[1],'34%2F0%2F9%2F0%2F115')){
        preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
        if(headerstatus(getvideourl($flvq[1]))=='HTTP/1.1 200 OK'){
    //print $flvq[1];
        header('Location: '.getvideourl($flvq[1]));
        }else{
                preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
                    echo '<a href="'.getvideourl($flvq[1]).'">FLV QUALITY DIGER</a><br />';
        }
    }
    victories adlı üyeden alıntı: mesajı görüntüle
    güzel bir çalışma tebrikler ama her seferinde ip sorgulatmak yerine keşke script içine yazsaydınız ipleri.

    çokta güzel çalışıyor, tekrar tebrikler...

    http://www.klipdunyasi.com/proxytest/yt.php
    Onu düşündüm tabii, ama youtube ip lerinin değişken olup olmadığını bilmediğim için bu yöntemi kullandım. Ayrı bir txt dosyası yada script içine tabiki entegre edilebilir, onuda hazırlayıp buraya koyarım..





    Tias adlı üyeden alıntı: mesajı görüntüle
    peki jw player'da nasıl çalıştırabiliriz bunu engelsiz şekilde

    Buda basit, bunun içinde örnek bi kod eklerim.. (Örnek kullanımı ilk mesaja ekledim)
  • 17-08-2009, 18:00:51
    #6
    Üyeliği durduruldu
    öncelikle emeğin için teşekkür ederim bot çok güzel çalışıyor. ama jw playerda siteye eklemek için kullanamadım. acaba id veya url girilerek bir flv oluşturup bu flv adresiyle kullanılabilir hale getirebilirmisin. ama flv adresleri statik olmadığı için konuda video açılmadan youtube.php ye bağlanıp bu videonun o anlık flv adresini tekrar sorgulayıp sunması lazım sanırım. bu halde çekillendirebilir misin acaba ?
  • 17-08-2009, 18:28:34
    #7
    Enigmatic adlı üyeden alıntı: mesajı görüntüle
    Önce GET metodu için yorum satırlarını kaldır ve post metodu önüne yorum işareti koy.

    Sonra 94. satır dahil 153. satıra kadar (153 dahil) hepsini sil şu kodu ekleyip kaydet.

    /// FLV QUALITY
    if(strstr($formatmap[1],'34%2F0%2F9%2F0%2F115')){
        preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
        if(headerstatus(getvideourl($flvq[1]))=='HTTP/1.1 200 OK'){
    //print $flvq[1];
        header('Location: '.getvideourl($flvq[1]));
        }else{
                preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
                    echo '<a href="'.getvideourl($flvq[1]).'">FLV QUALITY DIGER</a><br />';
        }
    }
    Dediğinizi Yaptım.Son Satır için Hata kodu verdi.

    Parse error:  syntax error, unexpected $end in /home/forumtoc/public_html/kraltv/ytb.php on line 106
    106.satırda
    ?>
    var.
  • 17-08-2009, 18:54:27
    #8
    Bu da benden olsun
    <?php
    /**
    === YouTube Formatlari ===
    Video türleri:
    6 = 320x180 @ FLV;
    18 = 480x270 @ MP4;
    22 = 1280x720 @ MP4;
    35 = 640x360 @ FLV;
    */
    $videoid = $_GET['v'];
    $kalite = "18"; //Video türü
    parse_str(file_get_contents("http://youtube.com/get_video_info?video_id={$videoid}"),$i);
    if($i['status'] == 'fail' && $i['errorcode'] == '150') {
    $content = file_get_contents("http://www.youtube.com/watch?v={$videoid}");
    preg_match_all ("/(\\{.*?\\})/is", $content, $matches);
    $obj = json_decode($matches[0][1]);
    $token = $obj->{'t'};
    $fmt_url_map = $obj->{'fmt_url_map'};
    }
    elseif ($i['status'] == 'fail' && $i['errorcode'] != '150') {
    die("Fail, Errorcode: {$i['errorcode']} , Reason: {$i['reason']}");
    }
    else {
    $token = $i['token'];
    $fmt_url_map = $i['fmt_url_map'];
    }
    $url = "http://www.youtube.com/get_video.php?video_id={$videoid}&vq=2&fmt={$kalite}&t={$token}";
    $headers = get_headers($url,1);
    $video = $headers['Location'];
    if(!isset($video)) {
    preg_match ("/((?:http|https)(?::\\/{2}[\\w]+)(?:[\\/|\\.]?)(?:[^\\s\"]*))/is", $fmt_url_map, $matches);
    $video = explode(',', $matches[0]); $video = $video[0];
    }
    $adres = array ('v1.lscache1.c.youtube.com','v2.lscache1.c.youtube.com','v3.lscache1.c.youtube.com','v4.lscache1.c.youtube.com','v5.lscache1.c.youtube.com','v6.lscache1.c.youtube.com','v7.lscache1.c.youtube.com','v8.lscache1.c.youtube.com','v9.lscache1.c.youtube.com','v10.lscache1.c.youtube.com','v11.lscache1.c.youtube.com','v12.lscache1.c.youtube.com','v13.lscache1.c.youtube.com','v14.lscache1.c.youtube.com','v15.lscache1.c.youtube.com','v16.lscache1.c.youtube.com','v17.lscache1.c.youtube.com','v18.lscache1.c.youtube.com','v19.lscache1.c.youtube.com','v20.lscache1.c.youtube.com','v21.lscache1.c.youtube.com','v22.lscache1.c.youtube.com','v23.lscache1.c.youtube.com','v24.lscache1.c.youtube.com',
    'v1.lscache2.c.youtube.com','v2.lscache2.c.youtube.com','v3.lscache2.c.youtube.com','v4.lscache2.c.youtube.com','v5.lscache2.c.youtube.com','v6.lscache2.c.youtube.com','v7.lscache2.c.youtube.com','v8.lscache2.c.youtube.com','v9.lscache2.c.youtube.com','v10.lscache2.c.youtube.com','v11.lscache2.c.youtube.com','v12.lscache2.c.youtube.com','v13.lscache2.c.youtube.com','v14.lscache2.c.youtube.com','v15.lscache2.c.youtube.com','v16.lscache2.c.youtube.com','v17.lscache2.c.youtube.com','v18.lscache2.c.youtube.com','v19.lscache2.c.youtube.com','v20.lscache2.c.youtube.com','v21.lscache2.c.youtube.com','v22.lscache2.c.youtube.com','v23.lscache2.c.youtube.com','v24.lscache2.c.youtube.com',
    'v1.lscache3.c.youtube.com','v2.lscache3.c.youtube.com','v3.lscache3.c.youtube.com','v4.lscache3.c.youtube.com','v5.lscache3.c.youtube.com','v6.lscache3.c.youtube.com','v7.lscache3.c.youtube.com','v8.lscache3.c.youtube.com','v9.lscache3.c.youtube.com','v10.lscache3.c.youtube.com','v11.lscache3.c.youtube.com','v12.lscache3.c.youtube.com','v13.lscache3.c.youtube.com','v14.lscache3.c.youtube.com','v15.lscache3.c.youtube.com','v16.lscache3.c.youtube.com','v17.lscache3.c.youtube.com','v18.lscache3.c.youtube.com','v19.lscache3.c.youtube.com','v20.lscache3.c.youtube.com','v21.lscache3.c.youtube.com','v22.lscache3.c.youtube.com','v23.lscache3.c.youtube.com','v24.lscache3.c.youtube.com','v1.lscache4.c.youtube.com','v2.lscache4.c.youtube.com','v3.lscache4.c.youtube.com','v4.lscache4.c.youtube.com','v5.lscache4.c.youtube.com','v6.lscache4.c.youtube.com','v7.lscache4.c.youtube.com','v8.lscache4.c.youtube.com','v9.lscache4.c.youtube.com','v10.lscache4.c.youtube.com','v11.lscache4.c.youtube.com','v12.lscache4.c.youtube.com','v13.lscache4.c.youtube.com','v14.lscache4.c.youtube.com','v15.lscache4.c.youtube.com','v16.lscache4.c.youtube.com','v17.lscache4.c.youtube.com','v18.lscache4.c.youtube.com','v19.lscache4.c.youtube.com','v20.lscache4.c.youtube.com','v21.lscache4.c.youtube.com','v22.lscache4.c.youtube.com','v23.lscache4.c.youtube.com','v24.lscache4.c.youtube.com','v1.lscache5.c.youtube.com','v2.lscache5.c.youtube.com','v3.lscache5.c.youtube.com','v4.lscache5.c.youtube.com','v5.lscache5.c.youtube.com','v6.lscache5.c.youtube.com','v7.lscache5.c.youtube.com','v8.lscache5.c.youtube.com','v9.lscache5.c.youtube.com','v10.lscache5.c.youtube.com','v11.lscache5.c.youtube.com','v12.lscache5.c.youtube.com','v13.lscache5.c.youtube.com','v14.lscache5.c.youtube.com','v15.lscache5.c.youtube.com','v16.lscache5.c.youtube.com','v17.lscache5.c.youtube.com','v18.lscache5.c.youtube.com','v19.lscache5.c.youtube.com','v20.lscache5.c.youtube.com','v21.lscache5.c.youtube.com','v22.lscache5.c.youtube.com','v23.lscache5.c.youtube.com','v24.lscache5.c.youtube.com','v1.lscache6.c.youtube.com','v2.lscache6.c.youtube.com','v3.lscache6.c.youtube.com','v4.lscache6.c.youtube.com','v5.lscache6.c.youtube.com','v6.lscache6.c.youtube.com','v7.lscache6.c.youtube.com','v8.lscache6.c.youtube.com','v9.lscache6.c.youtube.com','v10.lscache6.c.youtube.com','v11.lscache6.c.youtube.com','v12.lscache6.c.youtube.com','v13.lscache6.c.youtube.com','v14.lscache6.c.youtube.com','v15.lscache6.c.youtube.com','v16.lscache6.c.youtube.com','v17.lscache6.c.youtube.com','v18.lscache6.c.youtube.com','v19.lscache6.c.youtube.com','v20.lscache6.c.youtube.com','v21.lscache6.c.youtube.com','v22.lscache6.c.youtube.com','v23.lscache6.c.youtube.com','v24.lscache6.c.youtube.com','v1.lscache7.c.youtube.com','v2.lscache7.c.youtube.com','v3.lscache7.c.youtube.com','v4.lscache7.c.youtube.com','v5.lscache7.c.youtube.com','v6.lscache7.c.youtube.com','v7.lscache7.c.youtube.com','v8.lscache7.c.youtube.com','v9.lscache7.c.youtube.com','v10.lscache7.c.youtube.com','v11.lscache7.c.youtube.com','v12.lscache7.c.youtube.com','v13.lscache7.c.youtube.com','v14.lscache7.c.youtube.com','v15.lscache7.c.youtube.com','v16.lscache7.c.youtube.com','v17.lscache7.c.youtube.com','v18.lscache7.c.youtube.com','v19.lscache7.c.youtube.com','v20.lscache7.c.youtube.com','v21.lscache7.c.youtube.com','v22.lscache7.c.youtube.com','v23.lscache7.c.youtube.com','v24.lscache7.c.youtube.com','v1.lscache8.c.youtube.com','v2.lscache8.c.youtube.com','v3.lscache8.c.youtube.com','v4.lscache8.c.youtube.com','v5.lscache8.c.youtube.com','v6.lscache8.c.youtube.com','v7.lscache8.c.youtube.com','v8.lscache8.c.youtube.com','v9.lscache8.c.youtube.com','v10.lscache8.c.youtube.com','v11.lscache8.c.youtube.com','v12.lscache8.c.youtube.com','v13.lscache8.c.youtube.com','v14.lscache8.c.youtube.com','v15.lscache8.c.youtube.com','v16.lscache8.c.youtube.com','v17.lscache8.c.youtube.com','v18.lscache8.c.youtube.com','v19.lscache8.c.youtube.com','v20.lscache8.c.youtube.com','v21.lscache8.c.youtube.com','v22.lscache8.c.youtube.com','v23.lscache8.c.youtube.com','v24.lscache8.c.youtube.com');
    $cache_ip = array ('74.125.13.80','74.125.13.83','74.125.13.86','74.125.13.89','74.125.13.92','74.125.13.95','74.125.13.98','74.125.13.101','74.125.97.17','74.125.97.84','74.125.13.87','74.125.13.90','74.125.13.93','74.125.13.96','74.125.13.99','74.125.97.38','74.125.13.82','74.125.13.85','74.125.13.88','74.125.13.91','74.125.13.94','74.125.13.97','74.125.13.100','74.125.13.103','74.125.13.80','74.125.13.83','74.125.13.86','74.125.13.89','74.125.13.92','74.125.13.95','74.125.13.98','74.125.13.101','74.125.13.81','74.125.13.84','74.125.13.87','74.125.13.90','74.125.13.93','74.125.13.96','74.125.13.99','74.125.13.102','74.125.13.82','74.125.13.85','74.125.13.88','74.125.13.91','74.125.13.94','74.125.13.97','74.125.13.100','74.125.13.103','74.125.99.80','74.125.99.83','74.125.99.86','74.125.99.89','74.125.99.92','74.125.99.95','74.125.99.98','74.125.99.101','74.125.99.81','74.125.99.84','74.125.99.87','74.125.99.90','74.125.99.93','74.125.97.32','74.125.99.99','74.125.99.102','74.125.99.82','74.125.99.85','74.125.99.88','74.125.99.91','74.125.99.94','74.125.99.97','74.125.99.100','74.125.99.103','74.125.99.80','74.125.99.83','74.125.99.86','74.125.99.89','74.125.99.92','74.125.99.95','74.125.99.98','74.125.99.101','74.125.99.81','74.125.99.84','74.125.99.87','74.125.99.90','74.125.99.93','74.125.99.96','74.125.99.99','74.125.99.102','74.125.99.82','74.125.99.85','74.125.99.88','74.125.99.91','74.125.99.94','74.125.99.97','74.125.99.100','74.125.99.103','74.125.99.16','74.125.99.19','74.125.99.22','74.125.99.25','74.125.99.28','74.125.99.28','74.125.99.34','74.125.99.37','74.125.99.17','74.125.97.20','74.125.99.23','74.125.170.154','74.125.99.29','74.125.99.32','74.125.99.35','74.125.99.38','74.125.99.18','74.125.99.21','74.125.99.24','74.125.99.27','74.125.99.30','74.125.99.33','74.125.99.36','74.125.99.39','74.125.99.16','74.125.99.19','74.125.99.22','74.125.99.25','74.125.99.28','74.125.99.31','74.125.99.34','74.125.99.37','74.125.99.17','74.125.99.20','74.125.99.23','74.125.99.26','74.125.99.29','74.125.99.32','74.125.99.35','74.125.99.38','74.125.99.18','74.125.99.21','74.125.99.24','74.125.99.27','74.125.99.30','74.125.99.33','74.125.99.36','74.125.99.39','74.125.170.208','74.125.170.211','74.125.170.214','74.125.170.217','74.125.170.220','74.125.170.223','74.125.170.226','74.125.170.229','74.125.170.209','74.125.170.212','74.125.170.215','74.125.170.218','74.125.170.221','74.125.170.224','74.125.170.227','74.125.170.230','74.125.170.210','74.125.170.213','74.125.170.216','74.125.170.219','74.125.170.222','74.125.170.225','74.125.170.228','74.125.170.231','74.125.170.208','74.125.170.211','74.125.170.214','74.125.170.217','74.125.170.220','74.125.170.159','74.125.170.226','74.125.170.229','74.125.170.209','74.125.170.212','74.125.170.215','74.125.170.218','74.125.170.221','74.125.170.224','74.125.170.227','74.125.170.230','74.125.170.210','74.125.170.213','74.125.170.216','74.125.170.219','74.125.170.222','74.125.170.225','74.125.170.228','74.125.170.231');
    $video = str_replace($adres, $cache_ip, $video);
    header("Location: $video");
    ?>
    yukarıdaki kodu proxy.php diye kaydedin ardından
    http://www.siteadi.com/proxy.php?v=QnWZwhxuNZQ
    QnWZwhxuNZQ = YouTube id sini girin
    Bu şekilde jw playera eklendiğinde videoları gösterir.
    $kalite = "18"; //Video türü de burdan ayarlanıyor
    6 = 320x180 @ FLV;
    18 = 480x270 @ MP4;
    22 = 1280x720 @ MP4;
    35 = 640x360 @ FLV;
    jw player koduna şu şekilde eklenir:
    <script type="text/javascript">
    var so = new SWFObject('../player/player.swf','mpl','470','320','9');
    so.addParam('allowscriptaccess','always');
    so.addParam('allowfullscreen','true');
    so.addParam('flashvars','&file=proxy.php?v=QnWZwhxuNZQ&type=video');
    so.write('player');
    </script>
    so.addParam('flashvars','&file=proxy.php?v=QnWZwhx uNZQ&type=video'); bu kısmı proxy.php?v=$değişken olarak belirleyip youtube videoarınızı görüntüleyebilirsiniz ve istediğiniz formatta Herkesin bir yoğurt yiyişi vardır. Bende böyle yaptım lütfen baltalayıcı mesajlar gelmesin. Bu şekilde yaptığım 5 çeşit var bunu paylaşmak istedim çalışır sorun çıkarmaz. Unutmayın ki şimdilik Youttube sürekleri apilerini değiştirmekte.
  • 17-08-2009, 22:00:13
    #9
    Öncelikle;
    victories rumuzlu arkadaşım birkaç mesaj üstte

    Alıntı
    güzel bir çalışma tebrikler ama her seferinde ip sorgulatmak yerine keşke script içine yazsaydınız ipleri.
    demişti, ben ip lerin statik olup olmadığını bilmediğim için o şekilde yapmıştım ama iyiki de öyle yapmışım, çünkü youtube bir kaç gün önce yine ip değiştirdi, bot yazdıran tüm arkadaşlar yeniden bot yazdırmak zorun da kaldı, ama buradaki bot halâ sapasağlam çalışıyor. Şimdi iyiki böyle bir yöntem yapmışız diyorum.


    Sati adlı üyeden alıntı: mesajı görüntüle
    öncelikle emeğin için teşekkür ederim bot çok güzel çalışıyor. ama jw playerda siteye eklemek için kullanamadım. acaba id veya url girilerek bir flv oluşturup bu flv adresiyle kullanılabilir hale getirebilirmisin. ama flv adresleri statik olmadığı için konuda video açılmadan youtube.php ye bağlanıp bu videonun o anlık flv adresini tekrar sorgulayıp sunması lazım sanırım. bu halde çekillendirebilir misin acaba ?
    Bot mükemmel çalışıyor, jw playerde de çalışıyor, çalışan bir örneği ilk mesaja eklemiştim, çağırmanız gereken url şu şekilde idi;

    youtube.php?videourl=http://www.youtube.com/watch?v=I1qrgXjT6z0
    gibi, yani palyerde video adresi kısmına linki bu şekilde girmelisiniz, birde flv adreslerinden bahsetmişsiniz, evet flv adresleri statik değil, yani bu adresi veritabanına kaydettiğinizde ertesi gün aynı videonun çalmama ihtimali %100, çünkü youtube videolarında expire değeri mevcut, bunun yerine flv adresini değilde video id si ni veritabanına kaydedebilirsiniz, youtube herşeyi değiştirebilir ama video id si kesinlikle değişemez, sizde her seferinde bu id ile bota flv adresini sorgulatıp playeriniz de oynatmalısınız.

    Şimdi geçen 4 arkadaşın sitesini düzenledim, hepsinde de neredeyse aynı sistem kullanılmış, bende ona uygun bir kod hazırlamıştım, en altta o kodu vereceğim, playerinizde video adresi kısmına;

    youtube.php?videourl=http://www.youtube.com/watch?v=I1qrgXjT6z0
    link vermelisiniz çalışması için, ayrıca bu kod da sırasıyla kaliteli flv, düşük flv, mp4 ve hd linki verir, yani biri yksa diğerinin linkini verir, ilk mesajda bu şekilde değildi, hepsini aynı anda veriyordu.

    SeaL05 arkadaşım sizde en altta vereceğim kodu kullanabilirsiniz.

    Gunalp kod için teşekkürler, emeğine sağlık..


    Kodu son olarak b şekilde düzenledim, kullanım şekli2 tür;

    youtube.php?videourl=I1qrgXjT6z0
    yada

    youtube.php?videourl=http://www.youtube.com/watch?v=I1qrgXjT6z0
    şeklinde kullanabilirsiniz..



    Herhangi bir isimle kaydedebilirsiniz, header hatası almamak için <?php tagından önce boşluk olmadığına emin olun...

    <?
    #######################################################################
    ##
    ## Advanced Youtube Bot V.1.0
    ## Author : Enigmatic
    ## Mail and MSN Address : enigmatic[x]live.com
    ## 
    ## You're not needed DNS or Proxy server for bot, videos are
    ## getting directly under from Youtube IP Address..
    ##
    ## You can change are codes and use unauthorized, no license required.
    ##
    #######################################################################
    
    function getvideourl($rawlink){
    preg_match('#http%3A%2F%2F(.*?)%2Fvideoplayback#si',$rawlink,$server);
    $getip = file_get_contents('http://tools.web-max.ca/findwebsitesip.php?domain='.$server[1]);
    preg_match('#<img src="images/arrow-down.gif" align="absmiddle">&nbsp;(.*?)</a><br>#si',$getip,$rawip);
    $ip=trim(strip_tags($rawip[1]));
    $rawlink=urldecode(str_replace($server[1],$ip,$rawlink));
    return $rawlink;
    }
    function headerstatus($link){
    $control = get_headers($link);
    $link=$control[0];
    return $link;
    }
    
    if(empty($_GET['videourl']))
    {
    echo "Lütfen bir video linki girin...";
    }
    else
    {
    $videourl = strip_tags($_GET['videourl']);
    
    if(empty($videourl)){
    echo 'Lütfen bir video adresi giriniz...';
    exit;
    }
    $videoid=explode('v=',$videourl);
    $videoid=substr($videoid[1],0,11);
    if(strlen($videoid)<10){
    $videoid=$_GET['videourl'];
    }
    $videodata=file_get_contents('http://64.15.120.233/get_video_info?&video_id='.$videoid);
    if(strstr($videodata,'status=fail&errorcode')){
    echo 'Bu videoda embed kodu deaktiftir.';
    exit;
    }
    preg_match('#fmt_map=(.*?)&#',$videodata,$formatmap);
    if(strstr($formatmap[1],'5%2F0%2F7%2F0%2F0')){
        preg_match('#5%7C(.*?)&allow_ratings#',$videodata,$flvn);
        if(headerstatus(getvideourl($flvn[1]))=='HTTP/1.1 200 OK'){
        header('Location: '.getvideourl($flvn[1]));
        }else{
                preg_match('#5%7C(.*?)&fmt#',$videodata,$flvn);
                if(headerstatus(getvideourl($flvq[1]))=='HTTP/1.1 200 OK'){
                    header('Location: '.getvideourl($flvn[1]));
               }
            }
      }else{
    if(strstr($formatmap[1],'34%2F0%2F9%2F0%2F115')){
        preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
        if(headerstatus(getvideourl($flvq[1]))=='HTTP/1.1 200 OK'){
        header('Location: '.getvideourl($flvq[1]));
    
        }else{
                   preg_match('#34%7C(.*?)%2C#',$videodata,$flvq);
                   if(headerstatus(getvideourl($flvq[1]))=='HTTP/1.1 200 OK'){
                   header('Location: '.getvideourl($flvq[1]));
                   }
        }
    }
     }
    }
    
    ?>