Sayfa 1/4 123 ... SonSon
18 sonuçtan 1 ile 5 arası

Konu: Easyizle.com PHP Yardımı?

  1. Teşekküre Gitİndir #1
    Teşekküre Git
    Üye Yazar Panda - ait Kullanıcı Resmi (Avatar)

    Bilgi

    Gönderi Başına Git

    Soru Easyizle.com PHP Yardımı?

    Herkese merhaba dostlar, abiler...


    Easyizle.com için bir php yaptım, bu php,embed URL'sini çekerek oynatmasını sağlayacak.
    Ancak şöyle bir sorun var ki, embed URL'sinden sonra #ExtM3u outputunu veren bir list URL'si var, PHP'nin oraya yönlenmesini sağlayamıyorum.
    Mümkün ise bir göz atıp fikir verebilir misiniz?


    Şimdiden Teşekkürler...


    Easyizle.com PHP'si:


    <?php
    $serie = isset($_GET['serie']) ? $_GET['serie'] : null;
    $season = isset($_GET['season']) ? $_GET['season'] : null;
    $episode = isset($_GET['episode']) ? $_GET['episode'] : null;


    if ($serie && $season && $episode) {
    $easyizleUrl = "https://easyizle.com/dizi/{$serie}/sezon-{$season}/bolum-{$episode}";


    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $easyizleUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    $response = curl_exec($ch);
    curl_close($ch);


    if (preg_match('/<iframe[^>]+src="([^"]+hdmomplayer\.com\/embed\/[^"]+)"[^>]*>/', $response, $matches)) {
    $embedUrl = $matches[1];

    header("Location: play.php?embedUrl=" . $embedUrl);
    exit;
    } else {
    echo "Embed URL'si bulunamadı.";
    }
    } else {
    echo "Lütfen geçerli bir dizi, sezon ve bölüm girin.";
    }
    ?>


    Play.php:


    <?php
    $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;


    if ($embedUrl) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $embedUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Referer: [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..'
    ));
    $response = curl_exec($ch);


    $effectiveUrl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
    curl_close($ch);


    if (preg_match('/^https:\/\/hdmomplayer\.com\/list\/([^"]+)$/', $effectiveUrl, $matches)) {
    $listUrl = $effectiveUrl;


    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $listUrl);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    "Referer: $embedUrl" // List URL'ye referer ekle
    ));
    $listResponse = curl_exec($ch);
    curl_close($ch);


    if ($listResponse) {
    if (preg_match('/#EXTM3U.*$/s', $listResponse, $playlist)) {
    header("Content-Type: application/x-mpegURL");
    echo $playlist[0];
    } else {
    echo "M3U8 playlist bulunamadı.";
    }
    } else {
    echo "List URL'sinden veri alınamadı.";
    }
    } else {
    echo "List URL'si bulunamadı.";
    }
    } else {
    echo "Geçerli bir embed URL'si sağlanamadı.";
    }
    ?>




  2. Yazar Panda üyemize teşekkür edenler:

  3. Teşekküre Gitİndir #2
    Teşekküre Git
    Superuser KaRaTuTKu - ait Kullanıcı Resmi (Avatar)

    Bilgi

    Gönderi Başına Git

    Bir denermisin

    easyizle.php:

    PHP- Kodu:
    1. <?php
    2. $serie = isset($_GET['serie']) ? $_GET['serie'] : null;
    3. $season = isset($_GET['season']) ? $_GET['season'] : null;
    4. $episode = isset($_GET['episode']) ? $_GET['episode'] : null;
    5. if ($serie && $season && $episode) {
    6.     $easyizleUrl "https://easyizle.com/dizi/{$serie}/sezon-{$season}/bolum-{$episode}";
    7.     $ch curl_init();
    8.     curl_setopt($chCURLOPT_URL$easyizleUrl);
    9.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    10.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    11.     $response curl_exec($ch);
    12.     curl_close($ch);
    13.     if (preg_match('/<iframe[^>]+src="([^"]+hdmomplayer\.com\/embed\/[^"]+)"[^>]*>/'$response$matches)) {
    14.         $embedUrl $matches[1];
    15.         header("Location: play.php?embedUrl=" urlencode($embedUrl));
    16.         exit;
    17.     } else {
    18.         echo "Embed URL'si bulunamadı.";
    19.     }
    20. } else {
    21.     echo "Lütfen geçerli bir dizi, sezon ve bölüm girin.";
    22. }
    23. ?>


    play.php:

    PHP- Kodu:
    1. <?php
    2. $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;
    3. if ($embedUrl) {
    4.     $ch curl_init();
    5.     curl_setopt($chCURLOPT_URL$embedUrl);
    6.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    7.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    8.     curl_setopt($chCURLOPT_HTTPHEADER, array(
    9.         'Referer: https://easyizle.com/'
    10.     ));
    11.     $response curl_exec($ch);
    12.     $effectiveUrl curl_getinfo($chCURLINFO_EFFECTIVE_URL);
    13.     curl_close($ch);
    14.     if (preg_match('/^https:\/\/hdmomplayer\.com\/list\/([^"]+)$/'$effectiveUrl$matches)) {
    15.         $listUrl $effectiveUrl;
    16.         $ch curl_init();
    17.         curl_setopt($chCURLOPT_URL$listUrl);
    18.         curl_setopt($chCURLOPT_RETURNTRANSFER1);
    19.         curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    20.         curl_setopt($chCURLOPT_HTTPHEADER, array(
    21.             "Referer: $embedUrl// List URL'ye referer ekle
    22.         ));
    23.         $listResponse curl_exec($ch);
    24.         curl_close($ch);
    25.         if ($listResponse) {
    26.             if (preg_match('/#EXTM3U.*$/s'$listResponse$playlist)) {
    27.                 header("Content-Type: application/x-mpegURL");
    28.                 echo $playlist[0];
    29.             } else {
    30.                 echo "M3U8 playlist bulunamadı.";
    31.             }
    32.         } else {
    33.             echo "List URL'sinden veri alınamadı.";
    34.         }
    35.     } else {
    36.         echo "List URL'si bulunamadı.";
    37.     }
    38. } else {
    39.     echo "Geçerli bir embed URL'si sağlanamadı.";
    40. }
    41. ?>


  4. KaRaTuTKu üyemize teşekkür edenler:

  5. Teşekküre Gitİndir #3
    Teşekküre Git
    Üye Yazar Panda - ait Kullanıcı Resmi (Avatar)

    Bilgi

    Gönderi Başına Git

    Hocam, kodda tırnak hatası var sanırım. Unexpected identifier hatası alıyorum 2. Satırda.. Acaba kopyala düğmesi yüzünden mi oluyor?

    Alıntı KaRaTuTKu Nickli Üyeden Alıntı Mesajı göster
    Bir denermisin

    easyizle.php:

    PHP- Kodu:
    1. <?php
    2. $serie = isset($_GET['serie']) ? $_GET['serie'] : null;
    3. $season = isset($_GET['season']) ? $_GET['season'] : null;
    4. $episode = isset($_GET['episode']) ? $_GET['episode'] : null;
    5. if ($serie && $season && $episode) {
    6.     $easyizleUrl "https://easyizle.com/dizi/{$serie}/sezon-{$season}/bolum-{$episode}";
    7.     $ch curl_init();
    8.     curl_setopt($chCURLOPT_URL$easyizleUrl);
    9.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    10.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    11.     $response curl_exec($ch);
    12.     curl_close($ch);
    13.     if (preg_match('/<iframe[^>]+src="([^"]+hdmomplayer\.com\/embed\/[^"]+)"[^>]*>/'$response$matches)) {
    14.         $embedUrl $matches[1];
    15.         header("Location: play.php?embedUrl=" urlencode($embedUrl));
    16.         exit;
    17.     } else {
    18.         echo "Embed URL'si bulunamadı.";
    19.     }
    20. } else {
    21.     echo "Lütfen geçerli bir dizi, sezon ve bölüm girin.";
    22. }
    23. ?>


    play.php:

    PHP- Kodu:
    1. <?php
    2. $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;
    3. if ($embedUrl) {
    4.     $ch curl_init();
    5.     curl_setopt($chCURLOPT_URL$embedUrl);
    6.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    7.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    8.     curl_setopt($chCURLOPT_HTTPHEADER, array(
    9.         'Referer: https://easyizle.com/'
    10.     ));
    11.     $response curl_exec($ch);
    12.     $effectiveUrl curl_getinfo($chCURLINFO_EFFECTIVE_URL);
    13.     curl_close($ch);
    14.     if (preg_match('/^https:\/\/hdmomplayer\.com\/list\/([^"]+)$/'$effectiveUrl$matches)) {
    15.         $listUrl $effectiveUrl;
    16.         $ch curl_init();
    17.         curl_setopt($chCURLOPT_URL$listUrl);
    18.         curl_setopt($chCURLOPT_RETURNTRANSFER1);
    19.         curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    20.         curl_setopt($chCURLOPT_HTTPHEADER, array(
    21.             "Referer: $embedUrl// List URL'ye referer ekle
    22.         ));
    23.         $listResponse curl_exec($ch);
    24.         curl_close($ch);
    25.         if ($listResponse) {
    26.             if (preg_match('/#EXTM3U.*$/s'$listResponse$playlist)) {
    27.                 header("Content-Type: application/x-mpegURL");
    28.                 echo $playlist[0];
    29.             } else {
    30.                 echo "M3U8 playlist bulunamadı.";
    31.             }
    32.         } else {
    33.             echo "List URL'sinden veri alınamadı.";
    34.         }
    35.     } else {
    36.         echo "List URL'si bulunamadı.";
    37.     }
    38. } else {
    39.     echo "Geçerli bir embed URL'si sağlanamadı.";
    40. }
    41. ?>


  6. Teşekküre Gitİndir #4
    Teşekküre Git
    Üye Yazar Panda - ait Kullanıcı Resmi (Avatar)

    Bilgi

    Gönderi Başına Git

    Tamamdır syntaks hatasını düzelttim, ancak hala list URL'si bulunamadı hatası alıyorum.
    Sanırım direkt player sayfasını göstermem gerekecek.

    Alıntı KaRaTuTKu Nickli Üyeden Alıntı Mesajı göster
    Bir denermisin

    easyizle.php:

    PHP- Kodu:
    1. <?php
    2. $serie = isset($_GET['serie']) ? $_GET['serie'] : null;
    3. $season = isset($_GET['season']) ? $_GET['season'] : null;
    4. $episode = isset($_GET['episode']) ? $_GET['episode'] : null;
    5. if ($serie && $season && $episode) {
    6.     $easyizleUrl "https://easyizle.com/dizi/{$serie}/sezon-{$season}/bolum-{$episode}";
    7.     $ch curl_init();
    8.     curl_setopt($chCURLOPT_URL$easyizleUrl);
    9.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    10.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    11.     $response curl_exec($ch);
    12.     curl_close($ch);
    13.     if (preg_match('/<iframe[^>]+src="([^"]+hdmomplayer\.com\/embed\/[^"]+)"[^>]*>/'$response$matches)) {
    14.         $embedUrl $matches[1];
    15.         header("Location: play.php?embedUrl=" urlencode($embedUrl));
    16.         exit;
    17.     } else {
    18.         echo "Embed URL'si bulunamadı.";
    19.     }
    20. } else {
    21.     echo "Lütfen geçerli bir dizi, sezon ve bölüm girin.";
    22. }
    23. ?>


    play.php:

    PHP- Kodu:
    1. <?php
    2. $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;
    3. if ($embedUrl) {
    4.     $ch curl_init();
    5.     curl_setopt($chCURLOPT_URL$embedUrl);
    6.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    7.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    8.     curl_setopt($chCURLOPT_HTTPHEADER, array(
    9.         'Referer: https://easyizle.com/'
    10.     ));
    11.     $response curl_exec($ch);
    12.     $effectiveUrl curl_getinfo($chCURLINFO_EFFECTIVE_URL);
    13.     curl_close($ch);
    14.     if (preg_match('/^https:\/\/hdmomplayer\.com\/list\/([^"]+)$/'$effectiveUrl$matches)) {
    15.         $listUrl $effectiveUrl;
    16.         $ch curl_init();
    17.         curl_setopt($chCURLOPT_URL$listUrl);
    18.         curl_setopt($chCURLOPT_RETURNTRANSFER1);
    19.         curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    20.         curl_setopt($chCURLOPT_HTTPHEADER, array(
    21.             "Referer: $embedUrl// List URL'ye referer ekle
    22.         ));
    23.         $listResponse curl_exec($ch);
    24.         curl_close($ch);
    25.         if ($listResponse) {
    26.             if (preg_match('/#EXTM3U.*$/s'$listResponse$playlist)) {
    27.                 header("Content-Type: application/x-mpegURL");
    28.                 echo $playlist[0];
    29.             } else {
    30.                 echo "M3U8 playlist bulunamadı.";
    31.             }
    32.         } else {
    33.             echo "List URL'sinden veri alınamadı.";
    34.         }
    35.     } else {
    36.         echo "List URL'si bulunamadı.";
    37.     }
    38. } else {
    39.     echo "Geçerli bir embed URL'si sağlanamadı.";
    40. }
    41. ?>


  7. Teşekküre Gitİndir #5
    Teşekküre Git
    Superuser KaRaTuTKu - ait Kullanıcı Resmi (Avatar)

    Bilgi

    Gönderi Başına Git

    Bu kodu kullanarak play.php dosyanı embed URL'i ile doğrudan player sayfasını gösterir hale getirebilir belki bir ugras bakalim


    PHP- Kodu:
    1. <?php
    2. $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;
    3. if ($embedUrl) {
    4.     echo "<!DOCTYPE html>";
    5.     echo "<html lang=\"en\">";
    6.     echo "<head>";
    7.     echo "<meta charset=\"UTF-8\">";
    8.     echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">";
    9.     echo "<title>Player</title>";
    10.     echo "</head>";
    11.     echo "<body style=\"margin: 0;\">";
    12.     echo "<iframe src=\"$embedUrl\" width=\"100%\" height=\"100%\" frameborder=\"0\" allowfullscreen></iframe>";
    13.     echo "</body>";
    14.     echo "</html>";
    15. } else {
    16.     echo "Geçerli bir embed URL'si sağlanamadı.";
    17. }
    18. ?>


    easyizle.php

    PHP- Kodu:
    1. <?php
    2. $serie = isset($_GET['serie']) ? $_GET['serie'] : null;
    3. $season = isset($_GET['season']) ? $_GET['season'] : null;
    4. $episode = isset($_GET['episode']) ? $_GET['episode'] : null;
    5. if ($serie && $season && $episode) {
    6.     $easyizleUrl "https://easyizle.com/dizi/{$serie}/sezon-{$season}/bolum-{$episode}";
    7.     $ch curl_init();
    8.     curl_setopt($chCURLOPT_URL$easyizleUrl);
    9.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    10.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    11.     $response curl_exec($ch);
    12.     curl_close($ch);
    13.     if (preg_match('/<iframe[^>]+src="([^"]+hdmomplayer\.com\/embed\/[^"]+)"[^>]*>/'$response$matches)) {
    14.         $embedUrl $matches[1];
    15.         // Doğrudan embed URL'i ile player sayfasına yönlendir
    16.         header("Location: play.php?embedUrl=" urlencode($embedUrl));
    17.         exit;
    18.     } else {
    19.         echo "Embed URL'si bulunamadı.";
    20.     }
    21. } else {
    22.     echo "Lütfen geçerli bir dizi, sezon ve bölüm girin.";
    23. }
    24. ?>
    play.php


    PHP- Kodu:
    1. <?php
    2. $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;
    3. if ($embedUrl) {
    4.     echo "<!DOCTYPE html>";
    5.     echo "<html lang=\"en\">";
    6.     echo "<head>";
    7.     echo "<meta charset=\"UTF-8\">";
    8.     echo "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">";
    9.     echo "<title>Player</title>";
    10.     echo "</head>";
    11.     echo "<body style=\"margin: 0;\">";
    12.     echo "<iframe src=\"$embedUrl\" width=\"100%\" height=\"100%\" frameborder=\"0\" allowfullscreen></iframe>";
    13.     echo "</body>";
    14.     echo "</html>";
    15. } else {
    16.     echo "Geçerli bir embed URL'si sağlanamadı.";
    17. }
    18. ?>


    easyizle.php dosyasında, $embedUrl bulunduğunda doğrudan play.php sayfasına embed URL'i ile yönlendirme yapıyoruz.
    play.php dosyasında, $_GET['embedUrl'] üzerinden gelen embed URL'i ile bir HTML sayfası oluşturarak, bu URL'i <iframe> içinde gösteriyoruz.


    PHP- Kodu:
    1. <?php
    2. $embedUrl = isset($_GET['embedUrl']) ? $_GET['embedUrl'] : null;
    3. if ($embedUrl) {
    4.     $ch curl_init();
    5.     curl_setopt($chCURLOPT_URL$embedUrl);
    6.     curl_setopt($chCURLOPT_RETURNTRANSFER1);
    7.     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
    8.     curl_setopt($chCURLOPT_HTTPHEADER, array(
    9.         'Referer: https://easyizle.com/'
    10.     ));
    11.     $response curl_exec($ch);
    12.     curl_close($ch);
    13.     // Embed HTML içinde yayın linklerini bulma
    14.     if (preg_match_all('/source src=["\']([^"\']+)["\']/i'$response$matches)) {
    15.         header("Content-Type: application/x-mpegURL");
    16.         foreach ($matches[1] as $playlistUrl) {
    17.             if (strpos($playlistUrl'.m3u8') !== false) {
    18.                 echo $playlistUrl "\n";
    19.             }
    20.         }
    21.     } else {
    22.         echo "M3U8 playlist bulunamadı.";
    23.     }
    24. } else {
    25.     echo "Geçerli bir embed URL'si sağlanamadı.";
    26. }
    27. ?>


Sayfa 1/4 123 ... SonSon

Konu Bilgileri

Bu Konuya Gözatan Kullanıcılar

Şu an 4 kullanıcı var. (1 üye ve 3 konuk)

  1. yorfa

Bu Konudaki Etiketler

Yetkileriniz

  • Konu Acma Yetkiniz Yok
  • Cevap Yazma Yetkiniz Yok
  • Eklenti Yükleme Yetkiniz Yok
  • Mesajınızı Değiştirme Yetkiniz Yok
  •