Closed alexptbg closed 11 months ago
This would be awesome as there isn't any app that does it on PC.
You have SFvip-player for pc
For the devs I have found https://github.com/tweakunwanted/OpenXC-Main/blob/master/wwwdir/portal.php https://github.com/dougy147/mcbash/blob/main/bin/mcbash
It's harder for me to understand than xtream api.
let say portal is http://example.com/c and mac is 00:1A:79:1E:7F:50
mac needs to be url encoded
type can be stb, itv, vod, etc. and depending on the type different actions are allowed so for example in the browser this works
http://example.com/c/portal.php?type=stb&action=get_profile&mac=00%3A1A%3A79%3A1E%3A7F%3A50 http://example.com/c/portal.php?type=itv&action=get_all_channels&mac=00%3A1A%3A79%3A1E%3A7F%3A50 etc.
http://example.com/c/portal.php?type=itv&action=create_link&mac=00%3A1A%3A79%3A1E%3A7F%3A50
gives me
{"js":{"id":"","cmd":"ffmpeg http:\/\/example.com\/play\/live.php?mac=00:1A:79:1E:7F:50&stream=&extension=ts&play_token=zZ2vx3RiOH"},"streamer_id":0,"link_id":0,"load":0,"error":""}
I tried
but it didn't work I'm doing something wrong but I don't what
with xtream it was very easy you get the streamid from http://example.com/player_api.php?username=user&password=pass&action=get_live_streams and then you can build the stream url
http://example.com/live/user/pass/streamid.ts which will work directly in any player
if(validateDate($valid)==true){
$url = $portal.$loader."?type=itv&action=create_link&cmd=".$cmd."&series=&forced_storage=0&disable_ad=0&download=0&force_ch_link_check=0&JsHttpRequest=1-xml&mac=".$mac;
$url = str_replace(' ', '%20', $url);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_USERAGENT, $agent);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json;charset=UTF-8',
$authorization,
$cookie
));
$resp = curl_exec($curl);
$jsonData = json_decode($resp, true);
//$jsonData = strstr($jsonData, '{');
//$jsonData = strstr($jsonData, '}', true);
curl_close($curl);
/*
print "<pre>";
print_r($jsonData);
print "</pre>";
*/
if(!empty($jsonData)) {
//test4: experimental EPG WORKING
/*
$url2 = $portal."portal.php?type=itv&action=get_short_epg&ch_id=".$id."&size=10&JsHttpRequest=1-xml";
$curlX = curl_init($url2);
curl_setopt($curlX, CURLOPT_URL, $url2);
curl_setopt($curlX, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curlX, CURLOPT_USERAGENT, $agent);
curl_setopt($curlX, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json;charset=UTF-8',
$authorization,
$cookie
));
$resp2 = curl_exec($curlX);
$jsonData2 = json_decode($resp2, true);
curl_close($curlX);
*/
/*
print "<pre>";
print_r($jsonData2);
print "</pre>";
*/
//test4: experimental EPG END
$ff = str_replace($jsonData['js']['id'],$id,$jsonData['js']['cmd']);
//$ff = str_replace('ffmpeg ','',$jsonData['js']['cmd']);
$ff = str_replace('ffmpeg ','',$ff);
$pieces = explode("&", $ff);
//print_r($pieces[1]);
if(array_search("stream=",$pieces)!=NULL) {
if ((stripos($ff, "stream=") !==false)) {
//stream=
$ff = str_replace('stream=','stream='.$id,$ff);
}
}
/*
header("Content-Type: video/vnd.mpegurl");
header("Content-Disposition: attachment;filename=hvp-playlist.m3u");
header("Pragma: no-cache");
header("Expires: 0");
*/
header("Content-Type: video/vnd.mpegurl");
header("Pragma: public"); // required
//header("Content-Type: audio/x-mpegurl");
header("Content-Disposition: attachment; filename=itv-".time().".m3u");
//WITH EPC: echo "#EXTM3U url-tvg=\"".$url2."\" \r\n#EXTINF:0,".$name."\r\n#EXTVLCOPT:network-caching=9000\r\n".$ff."\r\n";
echo "#EXTM3U\r\n#EXTINF:0,".$name."\r\n#EXTVLCOPT:network-caching=9000\r\n#EXTVLCOPT:http-user-agent=".$agent."\r\n".$ff;
} else {
echo "error-5";
echo "<div><h2><a href='javascript:history.back()'><< Go Back</a></div></h2>";
}
}
Hi,
Using it for more than one year now. I can decode all portals and generate the "VLC" link I watch channels of the world, movies, series, netflix, amazon, diney+, apple TV and others. I made all the web app a year ago. If you want i can give you access for a limited time so you can test it.
Have a nice day.
Hey guys, it took me a while to implement stb/stalker portal support but now it's available in version 0.15. I would close that one, if something is missing there please open a new issue.
Hi, please, i know that might not be easy, but could you try to add MAC address specification / protocol for stb emu codes player (stalker player) ?