Results 1 to 5 of 5

Thread: Youtube'den canlıtv yayınların m3u8 alma php kodu

  1. Go to Thank YouDownload #1
    Go to Thank You
    Yönetici yilmaz's Avatar

    Info

    Go to Top of Post

    Default Youtube'den canlıtv yayınların m3u8 alma php kodu

    ATV için örnek php kodu
    Örnek bu canlı yayını aşağıdaki php kodu ile alınmaktadır [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..

    PHP Code:
    1. <?php
    2.     ini_set("user_agent","facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
    3.     /* gets the data from a URL */
    4. function get_data($url) {
    5.     $ch curl_init();
    6.     $timeout 5;
    7.     curl_setopt($chCURLOPT_URL$url);
    8.     curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    9.     curl_setopt($chCURLOPT_USERAGENT"facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
    10.     curl_setopt($chCURLOPT_REFERER"http://facebook.com");
    11.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    12.     curl_setopt($chCURLOPT_CONNECTTIMEOUT$timeout);
    13.     $data curl_exec($ch);
    14.     curl_close($ch);
    15.     return $data;
    16. }
    17. function baglan($video_id){
    18. $urlVideoDetails "https://www.youtube.com/get_video_info?video_id=$video_id&el=detailpage";
    19. $returnedData get_data($urlVideoDetails);
    20. parse_str($returnedData$query);
    21. $youtube rawurldecode("$returnedData");
    22. preg_match('@"hlsManifestUrl":"(.+?)"@si',$youtube,$matches);
    23. $youtube2 $matches[0];
    24. $youtube2 str_replace('"hlsManifestUrl":"' ""$youtube2);
    25. $youtube3 get_data($youtube2);
    26. preg_match_all('@https(.*?)m3u8@si',$youtube3$sec);
    27. $m3u$sec[0][5];
    28. if($m3u){$m3u8=$m3u;}else{$m3u$sec[0][4]; $m3u8=$m3u;}
    29. return $m3u8;
    30. }
    31. $m3u8 baglan("fRNgxSZBxbc");
    32. $title ="ATV HD-TR";
    33. $logo ="https://www.yilmaztv.com/logo/yt/atv.jpg";
    34. $dosyaicerik "\n#EXTINF:-1 tvg-id=\"$title\" tvg-name=\"$title\" tvg-logo=\"$logo\",$title yt\n$m3u8\n";
    35. $dosyaadi "atv.m3u8";
    36. $kayit fopen("$dosyaadi""w"); 
    37. fwrite($kayit,"$dosyaicerik");
    38. fclose($kayit);
    39. ?>
    Önemli: aynı ipden veya serverden saatte 5 biledin 10 sorgulam sonrası engel gelir, önerim her sorguda bunu ayrı bir dosya içine kayıt ettirmeniz lazım, izlenen cihaza kayıt ettirdiğiniz url adresini vermelisiniz .

    Direk php dosyasını verirseniz her kanal değiştirmede sorgu sayacaktır.

    Siteadresini/test/atv.php yi bir kere çalıştır, aldığı token 4 saatten fazla çalışır
    Siteadresini/test/atv.m3u8
    olarak cihazına ekleyin, çalışacaktır.

    m3u8 720p kalitesindedir,
    Selam ve Saygılarla İyi Forumlar...





  2. The Following 28 Users Say Thank You to yilmaz For This Useful Post:

  3. Go to Thank YouDownload #2
    Go to Thank You
    Üye ezelski's Avatar

    Info

    Go to Top of Post

    Quote Originally Posted by yilmaz View Post
    ATV için örnek php kodu
    Örnek bu canlı yayını aşağıdaki php kodu ile alınmaktadır [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..

    PHP Code:
    1. <?php
    2.     ini_set("user_agent","facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
    3.     /* gets the data from a URL */
    4. function get_data($url) {
    5.     $ch curl_init();
    6.     $timeout 5;
    7.     curl_setopt($chCURLOPT_URL$url);
    8.     curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    9.     curl_setopt($chCURLOPT_USERAGENT"facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
    10.     curl_setopt($chCURLOPT_REFERER"http://facebook.com");
    11.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    12.     curl_setopt($chCURLOPT_CONNECTTIMEOUT$timeout);
    13.     $data curl_exec($ch);
    14.     curl_close($ch);
    15.     return $data;
    16. }
    17. function baglan($video_id){
    18. $urlVideoDetails "https://www.youtube.com/get_video_info?video_id=$video_id&el=detailpage";
    19. $returnedData get_data($urlVideoDetails);
    20. parse_str($returnedData$query);
    21. $youtube rawurldecode("$returnedData");
    22. preg_match('@"hlsManifestUrl":"(.+?)"@si',$youtube,$matches);
    23. $youtube2 $matches[0];
    24. $youtube2 str_replace('"hlsManifestUrl":"' ""$youtube2);
    25. $youtube3 get_data($youtube2);
    26. preg_match_all('@https(.*?)m3u8@si',$youtube3$sec);
    27. $m3u$sec[0][5];
    28. if($m3u){$m3u8=$m3u;}else{$m3u$sec[0][4]; $m3u8=$m3u;}
    29. return $m3u8;
    30. }
    31. $m3u8 baglan("fRNgxSZBxbc");
    32. $title ="ATV HD-TR";
    33. $logo ="https://www.yilmaztv.com/logo/yt/atv.jpg";
    34. $dosyaicerik "\n#EXTINF:-1 tvg-id=\"$title\" tvg-name=\"$title\" tvg-logo=\"$logo\",$title yt\n$m3u8\n";
    35. $dosyaadi "atv.m3u8";
    36. $kayit fopen("$dosyaadi""w"); 
    37. fwrite($kayit,"$dosyaicerik");
    38. fclose($kayit);
    39. ?>
    Önemli: aynı ipden veya serverden saatte 5 biledin 10 sorgulam sonrası engel gelir, önerim her sorguda bunu ayrı bir dosya içine kayıt ettirmeniz lazım, izlenen cihaza kayıt ettirdiğiniz url adresini vermelisiniz .

    Direk php dosyasını verirseniz her kanal değiştirmede sorgu sayacaktır.

    Siteadresini/test/atv.php yi bir kere çalıştır, aldığı token 4 saatten fazla çalışır
    Siteadresini/test/atv.m3u8
    olarak cihazına ekleyin, çalışacaktır.

    m3u8 720p kalitesindedir,
    Yilmaz usta ben kendi serverim'da denedim ama çalismiyor nedense, video_id show'tv nin canli yayinini koydum, bana m3u8 uzantili link cikartiyor ama bir türlü, oynatamadim, bu sekil de denedim :
    Code:
    1. <?php
    2. ini_set("user_agent","facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
    3. /* gets the data from a URL */
    4. function get_data($url) {
    5. $ch = curl_init();
    6. $timeout = 5;
    7. curl_setopt($ch, CURLOPT_URL, $url);
    8. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    9. curl_setopt($ch, CURLOPT_USERAGENT, "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)");
    10. curl_setopt($ch, CURLOPT_REFERER, "http://facebook.com");
    11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    12. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    13. $data = curl_exec($ch);
    14. curl_close($ch);
    15. return $data;
    16. }
    17. function baglan($video_id){
    18. $urlVideoDetails = "https://www.youtube.com/get_video_info?video_id=$video_id&el=detailpage";
    19. $returnedData = get_data($urlVideoDetails);
    20. parse_str($returnedData, $query);
    21. $youtube = rawurldecode("$returnedData");
    22. preg_match('@"hlsManifestUrl":"(.+?)"@si',$youtube,$matches);
    23. $youtube2 = $matches[0];
    24. $youtube2 = str_replace('"hlsManifestUrl":"' , "", $youtube2);
    25. $youtube3 = get_data($youtube2);
    26. preg_match_all('@https(.*?)m3u8@si',$youtube3, $sec);
    27. $m3u= $sec[0][5];
    28. if($m3u){$m3u8=$m3u;}else{$m3u= $sec[0][4]; $m3u8=$m3u;}
    29. return $m3u8;
    30. }
    31. $m3u8 = baglan("inOugVa_NYA");
    32. header('Location: '.$m3u8);
    33. exit();
    34. ?>
    direkt m3u gondermesi için ama gine olmadi, acaba bu linkler ip adresine göremi çalisiyor ?


  4. The Following 2 Users Say Thank You to ezelski For This Useful Post:

  5. Go to Thank YouDownload #3
    Go to Thank You
    Yeni Üye hansmeier's Avatar

    Info

    Go to Top of Post

    bu automatik kendini günceliyormu , yoksa hergün eklemekmi gerek . bu token davasi ?


  6. The Following User Says Thank You to hansmeier For This Useful Post:
    lee

  7. Go to Thank YouDownload #4
    Go to Thank You
    Yeni Üye erenay58's Avatar

    Info

    Go to Top of Post

    paylaşımlar için cok tesekkur ederiz bu forumdan cok faydalanıyorum
    tesekkurler
    [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..


  8. The Following 4 Users Say Thank You to erenay58 For This Useful Post:

  9. Go to Thank YouDownload #5
    Go to Thank You
    Üye ezelski's Avatar

    Info

    Go to Top of Post

    yilmaz usta su vizyon tv'nin tokenli yayini'ni nnasil yapariz php ile ? bi el atsan olurmu ?


  10. The Following User Says Thank You to ezelski For This Useful Post:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •