Results 1 to 1 of 1

Thread: Diziyo.php konusunda yardımcı olabilir misiniz?

  1. Go to Thank YouDownload #1
    Go to Thank You
    Kıdemli Üye Yazar Panda's Avatar

    Info

    Go to Top of Post

    Default Diziyo.php konusunda yardımcı olabilir misiniz?

    Merhaba herkese,


    Diziyo'dan istediğim diziyi çekip uygulamama ekleyebilmek için bir .php yapma ile uğraşıyorum, ancak video URL'sini çekemiyorum. Master.txt'ye ulaşmak için hash'lı video URL'sini çekmem gerek, ancak sanırım iframe verisi şifreli olduğundan bunu başaramıyorum. Yine de referer ve origin ile bir veri gerekiyordu, ve ben de bu şekilde yaptım. Yine de çokta işe yaramadı.
    Eğer diziyo ile ilgili bir php yapabilen herhangi bir forum kullanıcısı var ise, bana yardımcı olursalar çok mutlu olurum. PHP'yi aşağıya bırakıyorum. Şimdiden çok teşekkür eder, bu mesajı yazdığım saat itibari ile hayırlı geceler dilerim. Saygılar...


    <?php
    ini_set('display_errors', 1);
    error_reporting(E_ALL);


    if (!isset($_GET['dizi']) || !isset($_GET['sezon']) || !isset($_GET['bolum']) || !isset($_GET['dublaj'])) {
    http_response_code(400);
    exit('Missing parameters.');
    }


    $dizi = htmlspecialchars($_GET['dizi']);
    $sezon = (int)$_GET['sezon'];
    $bolum = (int)$_GET['bolum'];
    $dublaj = (int)$_GET['dublaj'];


    $dublaj_text = $dublaj === 1 ? 'turkce-dublaj' : 'izle';
    $base_url = "https://www.diziyo.plus/bolum/";
    $bolum_url = $base_url . "{$dizi}-{$sezon}-sezon-{$bolum}-bolum-{$dublaj_text}/";


    function curl_get($url, $headers = [], $post_fields = null)
    {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    if ($post_fields) {
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
    }
    $response = curl_exec($ch);
    if (curl_errno($ch)) {
    curl_close($ch);
    return null;
    }
    curl_close($ch);
    return $response;
    }


    $html = curl_get($bolum_url, [
    'Referer: [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..',
    'Upgrade-Insecure-Requests: 1',
    ]);


    if (!$html) {
    http_response_code(500);
    exit('Failed to retrieve the episode page.');
    }


    preg_match('/\/player\/video\/([a-f0-9]{32})/', $html, $matches);


    if (!isset($matches[1])) {
    http_response_code(500);
    exit('Video hash not found.');
    }


    $video_hash = $matches[1];
    $player_url = "https://www.dzyco.site/player/video/{$video_hash}";
    $video_data = curl_get($player_url, [
    'Referer: [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..',
    'Origin: [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..',
    ], [
    'hash' => $video_hash,
    'r' => 'https://www.diziyo.plus/',
    ]);


    if (!$video_data) {
    http_response_code(500);
    exit('Failed to retrieve video data.');
    }


    $video_info = json_decode($video_data, true);


    if (!isset($video_info['videoSources'][0]['file'])) {
    http_response_code(500);
    exit('Master file URL not found.');
    }


    $master_txt_url = $video_info['videoSources'][0]['file'];
    $master_txt_content = curl_get($master_txt_url, [
    'Referer: [Sadece kayıtlı ve aktif kullanıcılar bağlantıları görebilir.] Kayıt Olmak İçin Tıklayınız..',
    ]);


    if (!$master_txt_content) {
    http_response_code(500);
    exit('Failed to retrieve master.txt content.');
    }


    header('Content-Type: text/plain');
    echo $master_txt_content;
    ?>




  2. The Following User Says Thank You to Yazar Panda 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
  •