• Vítejte na XBMC-Kodi.cz
  • Česko-slovenská komunita fanoušků XBMC/Kodi
Vítejte návštevníku! Přihlášení Registrace


Hodnocení tématu:
  • 3 Hlas(ů) - 5 Průměr
  • 1
  • 2
  • 3
  • 4
  • 5
Playlist 4NET (DigiTV, Poda, ...)
#73
(26.10.2021, 21:08)shumi21 Napsal(a):
(10.6.2020, 10:06)Saros Napsal(a): Telly v php
Token + párování:
Kód:
<?php
#login
$url = 'https://backoffice0-vip.tv.itself.cz/api/device/pairDeviceByLogin/';
$ch = curl_init($url);
$jsonData = array('id_brand' => 2, 'login' => 'login','password' => 'heslo');
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$j = json_decode($result,true);
$token = $j["token"];
curl_close($ch);
#echo $token;

#save token
$file = fopen("./token.txt", "w");
fwrite($file, $token);
fclose($file);

#pairing
$url = 'https://backoffice0-vip.tv.itself.cz/api/device/completeDevicePairing/';
$ch = curl_init($url);
$jsonData = array('device_token' => $token, 'device_type_code' => 'ANDROID_4_4PLUS','model' => 'xiaomi', 'name' => 'Redmi Note 7','serial_number' => 'unknown');
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$j = json_decode($result,true);
$res = $j["success"];
curl_close($ch);
echo $res;
?>

Playlist:
Kód:
<?php
#read token
$lines = file("token.txt", FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES);
$data = array_chunk($lines, 3);
$token = $data[0][0];
#echo $token;

#playlist
$url = 'https://backoffice0-vip.tv.itself.cz/api/device/getSources/';
$ch = curl_init($url);
$jsonData = array('device_token' => $token);
$jsonDataEncoded = json_encode($jsonData);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$j = json_decode($result,true);
$res = $j["channels"];
curl_close($ch);
$file = fopen("./telly.m3u8", "w");
fwrite($file, '#EXTM3U'."\n");
foreach($res as $ch){
$name = $ch["name"];
echo $name."<br/>";
$url = $ch["content_sources"][0]["stream_profile_urls"]["adaptive"];
fwrite($file, '#EXTINF:-1,'.$name."\n".$url."\n");
}
fclose($file);
?>

Ide niekomu tento script? mne nechce nacitat toket...vcera to este islo ....


EDIT: ok vyriesene..sry za spam

Zdravím pánové mám nově zaplacenou Telly snažím se dostat do Kodi.Mohl by mě někdo prosím poradit jak použít správně php scripty? Děkuji
Beelink GT King Coreelec 19.3
 
Citovat
  


Příspěvků v tématu
RE: Playlist DigiTV - od otava5 - 31.3.2019, 9:13
RE: Playlist DigiTV - od Client - 31.3.2019, 10:55
RE: Playlist DigiTV - od ericek74 - 31.3.2019, 13:04
RE: Playlist DigiTV - od Client - 31.3.2019, 13:20
RE: Playlist DigiTV - od Client - 31.3.2019, 16:47
RE: Playlist DigiTV - od Client - 01.4.2019, 7:36
RE: Playlist DigiTV - od marri - 01.4.2019, 9:03
RE: Playlist DigiTV - od ericek74 - 01.4.2019, 9:18
RE: Playlist DigiTV - od Client - 01.4.2019, 9:29
RE: Playlist DigiTV - od pan_klobouk - 03.4.2019, 14:59
RE: Playlist DigiTV - od Client - 03.4.2019, 17:06
RE: Playlist DigiTV - od nizo11 - 12.4.2019, 23:07
RE: Playlist DigiTV - od pan_klobouk - 04.4.2019, 8:09
RE: Playlist 4NET (DigiTV, Poda, ...) - od mnichovec - 17.11.2021, 12:21
Playlist 4NET (DigiTV, Poda, ...) - od beitlj - 17.11.2022, 21:55

Přejít na fórum:


Prochází: 2 host(ů)