Page 1 of 2 12 LastLast
Results 1 to 5 of 10

Thread: Dsmart PHP yardım?

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

    Info

    Go to Top of Post

    Soru Dsmart PHP yardım?

    Merhaba...


    Bir dsmart paneli yapmaya çalışıyorum, ancak kanalın player'lar ve exo player'da oynatılmasını bir türlü sağlayamadım.
    Mesela fx.php'yi çalıştırdığımda, #ExtM3u
    #Ext Version3
    gibi bir output almam gerekirken, bu php dosyası direkt fx.m3u8'i indiriyor ve not defterinde düzenlersem bu output'u görebiliyorum.
    Ancak jwplayer, exo player gibi player'lar bunu desteklemiyor.
    Düzeltmem için yardımcı olabilirseniz çok mutlu olurum, şimdiden çok teşekkür ederim:


    dsmart-login.php:


    <?php
    function getToken() {
    $url = "https://api-crm4.ercdn.com/membership/login/mobile?key=ac3f095f717f2665f3e8787d8f62ebc1";
    $curl = curl_init($url);
    $data = array(
    "mobile" => "+90xxx",
    "password" => "",
    "rememberMe" => true
    );
    $jsonData = json_encode($data);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonData);
    $headers = array(
    "Content-Type: application/json",
    );
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    $userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3";
    curl_setopt($curl, CURLOPT_USERAGENT, $userAgent);
    curl_setopt($curl, CURLOPT_HEADER, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    $response = curl_exec($curl);
    $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
    $header = substr($response, 0, $header_size);
    curl_close($curl);


    preg_match('/token:\s*([^\s]+)/i', $header, $matches);
    $token = isset($matches[1]) ? $matches[1] : null;


    return $token;
    }
    ?>


    fx.php:


    <?php
    include 'dsmartlogin.php';


    $url = "https://crm-ticket4.ercdn.com/ticket/session/content?publicKey=ac3f095f717f2665f3e8787d8f62ebc1 ";
    $data = array(
    "Id" => 16203,
    "Type" => 7,
    "Products" => array(
    array(
    "ProductId" => 376,
    "PackageName" => "D-Smart Mega",
    "Bundle" => "dsmart",
    "Grade" => 300,
    "LicenseName" => "Mega Suresiz"
    )
    )
    );
    $jsonData = json_encode($data);


    $token = getToken();


    for ($i = 1; $i <= 25; $i++) {
    if ($i % 5 == 1 && $i > 1) {
    $token = getToken();
    }


    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonData);
    $headers = array(
    "Content-Type: application/json",
    "token: $token",
    "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0",
    "Origin: https://www.dsmartgo.com.tr",
    );
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_HEADER, true);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);


    $resp = curl_exec($curl);
    $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
    $header = substr($resp, 0, $header_size);
    $body = substr($resp, $header_size);
    curl_close($curl);


    echo "Body:\n$body\n";
    }
    ?>




  2. The Following 2 Users Say Thank You to Yazar Panda For This Useful Post:

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

    Info

    Go to Top of Post

    Bilen yok mu üstadlar?


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

  5. Go to Thank YouDownload #3
    Go to Thank You
    Kıdemli Üye markclark's Avatar

    Info

    Go to Top of Post

    dostum sen yanlış anlamadıysam aşağıdaki şekilde head çıkışlı olsun istiyorsun galiba linkleri
    bunun oluşumu için php nizi yapan arkadaş oluşan link üzerinden get oluşturup hehaders bilgilerini giricek hepsi bukadar

    #EXTM3U #EXT-X-VERSION:3 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3000000 fx_1080p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=17197757 73&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044& reqid=0d6394644114048cab6141af4d50c920&tmode=1 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000 fx_720p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=171977577 3&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044&r eqid=0d6394644114048cab6141af4d50c920&tmode=1 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000 fx_360p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=171977577 3&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044&r eqid=0d6394644114048cab6141af4d50c920&tmode=1


  6. Go to Thank YouDownload #4
    Go to Thank You
    Üye Yazar Panda's Avatar

    Info

    Go to Top of Post

    PHP'yi ben yaptım zaten...
    Ama get fonksiyonunu halledemedim. Eğer yapabilirsen güzel olur üstad çünkü header fonksiyonlarını öğrenemedim henüz. Benim için bir başlangıç olur en azından.

    Quote Originally Posted by markclark View Post
    dostum sen yanlış anlamadıysam aşağıdaki şekilde head çıkışlı olsun istiyorsun galiba linkleri
    bunun oluşumu için php nizi yapan arkadaş oluşan link üzerinden get oluşturup hehaders bilgilerini giricek hepsi bukadar

    #EXTM3U #EXT-X-VERSION:3 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3000000 fx_1080p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=17197757 73&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044& reqid=0d6394644114048cab6141af4d50c920&tmode=1 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000 fx_720p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=171977577 3&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044&r eqid=0d6394644114048cab6141af4d50c920&tmode=1 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000 fx_360p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=171977577 3&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044&r eqid=0d6394644114048cab6141af4d50c920&tmode=1


  7. Go to Thank YouDownload #5
    Go to Thank You
    Üye Yazar Panda's Avatar

    Info

    Go to Top of Post

    Bir de, direkt #ExtM3u olrak st'li linkler ile yapamayız çünkü bunlar ticket'ten alınıyor ve IP'ye göre random oluşuyorlar. Bu yüzden belli bir st= parametresi yapamayız.

    Quote Originally Posted by markclark View Post
    dostum sen yanlış anlamadıysam aşağıdaki şekilde head çıkışlı olsun istiyorsun galiba linkleri
    bunun oluşumu için php nizi yapan arkadaş oluşan link üzerinden get oluşturup hehaders bilgilerini giricek hepsi bukadar

    #EXTM3U #EXT-X-VERSION:3 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=3000000 fx_1080p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=17197757 73&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044& reqid=0d6394644114048cab6141af4d50c920&tmode=1 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000 fx_720p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=171977577 3&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044&r eqid=0d6394644114048cab6141af4d50c920&tmode=1 #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000 fx_360p.m3u8?st=BNG1E2_2kicqDa8QIR0m0g&e=171977577 3&uid=20764820&sid=MAHIGPECC5Cg0A&userid=ed27044&r eqid=0d6394644114048cab6141af4d50c920&tmode=1


Page 1 of 2 12 LastLast

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
  •