This commit is contained in:
mstfyldz
2026-02-16 18:56:01 +03:00
parent 192dfc2de8
commit bc423156cf
2975 changed files with 1171022 additions and 0 deletions

27
yaren/app/_bouqet.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
session_start();
if ($_SESSION["login"] != true AND $_SESSION["user_info"] == "") {
header("Location: index.php");
exit();
} else {
if ($_POST) {
require_once("../conf/functions.php");
$bouquets = $byakman->guvenlik($_POST["bouqet"]);
$post_data = array(
'username' => $byakman->userInfo('username'),
'password' => $byakman->userInfo('password'),
'user_data' => array(
'bouquet' => json_encode($bouquets)));
$api_re = json_decode($byakman->_curl($siteInfo->site_xtream . "api.php?action=user&sub=edit", $post_data), true);
if ($api_re["result"] == 1) {
echo 1;
} else {
echo 0;
}
}
}
?>

43
yaren/app/_header.php Normal file
View File

@@ -0,0 +1,43 @@
<!-- header wrapper -->
<div class="header-wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-lg-8 navbar p-0">
<a href="index.php?page=homepage" class="logo ml-5"><img src="files/<?= $siteInfo->site_logo; ?>" alt="logo" class="light"><img src="files/<?= $siteInfo->site_logo; ?>" alt="logo" class="dark"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<div class="hidden-lg-up mb-5 mt-5">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="fast-search col-md-12" id="fast-search" name="country_v1[query]" placeholder="<?= SEARCH_INPUT_TEXT; ?>" autocomplete="off">
</div>
</div>
</div>
</div>
<ul class="navbar-nav nav-menu float-none text-center">
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('homepage'); ?>"><?= MENU_HOMEPAGE; ?></a></li>
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('livetv'); ?>"><?= MENU_LIVETV; ?></a></li>
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('movies'); ?>"><?= MENU_MOVIES; ?></a></li>
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('series'); ?>"><?= MENU_SERIES; ?></a></li>
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('guides'); ?>"><?= MENU_GUIDES; ?></a></li>
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('profile'); ?>"><?= MENU_PROFILE; ?></a></li>
<li class="nav-item"><a class="nav-link" href="<?= $byakman->route('logout'); ?>"><?= MENU_LOGOUT; ?></a></li>
</ul>
</div>
</div>
<div class="col-lg-4">
<div class="search-div">
<div class="typeahead__container">
<div class="typeahead__field">
<div class="typeahead__query">
<input class="fast-search col-md-12" id="fast-search" name="country_v1[query]" placeholder="<?= SEARCH_INPUT_TEXT; ?>" autocomplete="off">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- header wrapper -->

92
yaren/app/_livetv.php Normal file
View File

@@ -0,0 +1,92 @@
<?php
session_start();
if ($_SESSION["login"] != true AND $_SESSION["user_info"] == "") {
header("Location: index.php");
exit();
} else {
if ($_POST) {
require_once("../conf/functions.php");
$type = $byakman->guvenlik($_POST["type"]);
if ($type == 1) {
$bouquet_cat = $byakman->guvenlik($_POST["cat"]);
if (isset($bouquet_cat)) {
if ($bouquet_cat != "") {
if (is_numeric($bouquet_cat)) {
$get_url = $byakman->player_api2($byakman->userInfo('username'), $byakman->userInfo('password'), "get_live_streams&category_id=", $bouquet_cat);
$urldata = json_decode($get_url, true);
$xml = $byakman->player_epg($byakman->userInfo('username'), $byakman->userInfo('password'));
$now = time();
$data = array();
$i = 1;
foreach ($urldata as $item) {
if ($item['epg_channel_id'] != null OR $item['epg_channel_id'] != "0" OR $item['epg_channel_id'] != "") {
$filtered = $xml->xpath('//programme[@channel="'.$item["epg_channel_id"].'"]');
$array = json_decode(json_encode((array)$filtered), TRUE);
$epg_data = array();
$e = 0;
foreach($array AS $filter) {
if((strtotime($filter["@attributes"]["start"]) <= $now) AND (strtotime($filter["@attributes"]["stop"]) >= $now)) {
$epg_data["title"] = $filter["title"];
}
$e++;
}
$data[$i]["epg_title"] = $epg_data["title"];
} else {
}
$data[$i]["stream_id"] = $item['stream_id'];
$data[$i]["stream_icon"] = $item['stream_icon'];
$data[$i]["name"] = $item['name'];
$i++;
}
echo json_encode($data, true);
}
}
}
} else if ($type == 2) {
$channel = $byakman->guvenlik($_POST["channel"]);
$channel_url = $siteInfo->site_xtream."live/".$byakman->userInfo("username")."/".$byakman->userInfo("password")."/".$channel.".m3u8";
echo $channel_url;
} else if ($type == 3) {
$channel = $byakman->guvenlik($_POST["channel"]);
$epg_url = $byakman->player_api($byakman->userInfo('username'), $byakman->userInfo('password'), "&action=get_simple_data_table&stream_id=".$channel."");
$cat_get = $byakman->get_curl($epg_url);
$getCat = json_decode($cat_get, true);
$data = array();
$now = time();
$i = 1;
foreach ($getCat["epg_listings"] as $item) {
if (strtotime($item["start"]) >= $now) {
$cevir_start = strtotime($item["start"]);
$cevir_end = strtotime($item["end"]);
$data[$i]["title"] = base64_decode($item["title"]);
$data[$i]["description"] = base64_decode($item["description"]);
$data[$i]["start"] = date("H:m", $cevir_start);
$data[$i]["end"] = date("H:m", $cevir_end);
if ($i++ == 4) break;
} else {
}
}
echo json_encode($data, true);
}
}
}
?>

118
yaren/app/_login.php Normal file
View File

@@ -0,0 +1,118 @@
<?
if ($_POST) {
session_start();
include("../conf/functions.php");
$type = $byakman->guvenlik($_POST["type"]);
if ($type == 1) {
$username = $byakman->guvenlik($_POST["username"]);
$password = $byakman->guvenlik($_POST["password"]);
$captcha = $_POST["captcha"];
$remember = isset($_POST['remember']) ? 1 : 0;
$data_url = $byakman->player_api($username, $password, "");
$get_data = $byakman->get_http_response_code($data_url);
if ($get_data !== "200") {
echo 4;
} else {
$connect_url = file_get_contents($data_url);
$get_url_data = json_decode($connect_url, true);
$data_auth = $get_url_data["user_info"]["auth"];
if ($data_auth) {
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
$recaptcha_secret = $siteInfo->recaptcha_secret;
$recaptcha_response = $captcha;
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
$recaptcha = json_decode($recaptcha);
if ($recaptcha->score >= 0.5) {
echo 2;
} else {
if ($get_url_data["user_info"]["status"] === 'Active') {
if ($siteInfo->unlimited_login == 0 AND $get_url_data["user_info"]["exp_date"] == null) {
echo 5;
} else {
$_SESSION["login"] = true;
$_SESSION["user_info"] = $get_url_data["user_info"];
if ($remember == 1) {
setcookie('username',$username, time()+ 31536000);
setcookie('password',$password, time()+ 31536000);
}
echo 1;
}
} else {
echo 3;
}
}
} else {
echo 4;
}
}
} else if ($type == 2) {
$mac = $byakman->guvenlik($_POST["mac"]);
$captcha = $_POST["captcha"];
$remember = isset($_POST['remember']) ? 1 : 0;
$post_data = array( 'mac' => strtoupper($mac) );
$opts = array( 'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query( $post_data ) ) );
$context = stream_context_create( $opts );
$api_result = json_decode( file_get_contents("".$siteInfo->site_xtream . "api.php?action=stb&sub=info", false, $context ), true );
if ($api_result['result'] == 1) {
$recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
$recaptcha_secret = $siteInfo->recaptcha_secret;
$recaptcha_response = $captcha;
$recaptcha = file_get_contents($recaptcha_url . '?secret=' . $recaptcha_secret . '&response=' . $recaptcha_response);
$recaptcha = json_decode($recaptcha);
if ($recaptcha->score >= 0.5) {
echo 2;
} else {
if($api_result["result"] == "1"){
if ($siteInfo->unlimited_login == 0 AND $api_result["user_info"]["exp_date"] == null) {
echo 5;
} else {
$_SESSION['login'] = true;
$_SESSION['userInfo'] = $api_result['user_info'];
$_SESSION['mac_address'] = $mac;
if ($remember == 1) {
setcookie('username',$api_result['user_info']['username'], time()+ 31536000);
setcookie('password',$api_result['user_info']['password'], time()+ 31536000);
setcookie('mac', $api_result['mag_device']['mac']);
}
echo 1;
}
} else {
echo 3;
}
}
} else {
echo 4;
}
} else {
}
}
?>

40
yaren/app/_passchange.php Normal file
View File

@@ -0,0 +1,40 @@
<?
session_start();
if ($_SESSION["login"] != true AND $_SESSION["user_info"] == "") {
header("Location: index.php");
exit();
} else {
include("../conf/functions.php");
if ($_POST) {
if ($siteInfo->password_change == 1) {
$password = $byakman->guvenlik($_POST["password"]);
$password_c = $byakman->guvenlik($_POST["password_c"]);
if ($password == "" OR $password_c == "") {
echo 2;
} else if ($password != $password_c) {
echo 3;
} else {
$post_data = array(
'username' => $byakman->userInfo('username'),
'password' => $byakman->userInfo('password'),
'user_data' => array(
'password' => $password));
$opts = array('http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($post_data)));
$context = stream_context_create($opts);
$api_re = json_decode(file_get_contents($siteInfo->site_xtream . "api.php?action=user&sub=edit", false, $context), true);
if ($api_re["result"] == 1) {
echo 1;
}
}
}
}
}
?>

53
yaren/app/_player.php Normal file
View File

@@ -0,0 +1,53 @@
<?php
session_start();
if ($_SESSION["login"] != true AND $_SESSION["user_info"] == "") {
header("Location: index.php");
exit();
} else {
if ($_POST) {
include("../conf/functions.php");
$type = $byakman->guvenlik($_POST["type"]);
$item = $byakman->guvenlik($_POST["item"]);
$file = $byakman->guvenlik($_POST["file"]);
switch ($tip){
case 'mkv':
$tip = '.mkv';
$mime = 'video/x-matroska';
break;
case 'mp4':
$tip = '.mp4';
$mime = 'video/mp4';
break;
case 'avi':
$tip = '.avi';
$mime = 'video/x-msvideo';
break;
}
if ($type == 1) {
$data = array();
$data["type"] = $type;
$data["item"] = $item;
$data["file"] = $tip;
$data["mime"] = $mime;
echo json_encode($data, true);
echo json_encode($movie_url, true);
} else if ($type == 2) {
$data = array();
$data["type"] = $type;
$data["item"] = $item;
$data["file"] = $tip;
$data["mime"] = $mime;
echo json_encode($data, true);
}
}
}

113
yaren/app/_playlist.php Normal file
View File

@@ -0,0 +1,113 @@
<?php
session_start();
if ($_SESSION["login"] != true AND $_SESSION["user_info"] == "") {
header("Location: index.php");
exit();
} else {
if ($_POST) {
include("../conf/functions.php");
$type = $byakman->guvenlik($_POST["type"]);
if ($type == 1) {
function SaveSipTv($mac='',$url='',$pin='')
{
$data = array(
'mac' => $mac,
'sel_countries' => "USSR",
'sel_logos' => 0,
'keep' => "on",
'lang' => "en",
'url1' => $url,
'epg1' => "",
'pin' => $pin,
'url_count' => 1,
'file_selected' => 0,
'plist_order' => 0,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://siptv.eu/scripts/up_url_only.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Connection: keep-alive';
$headers[] = 'Pragma: no-cache';
$headers[] = 'Cache-Control: no-cache';
$headers[] = 'Accept: */*';
$headers[] = 'Sec-Fetch-Dest: empty';
$headers[] = 'X-Requested-With: XMLHttpRequest';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36';
$headers[] = 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8';
$headers[] = 'Origin: https://siptv.eu';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Referer: https://siptv.eu/mylist/';
$headers[] = 'Accept-Language: tr,en;q=0.9';
$headers[] = 'Cookie: origin=valid; captcha=1';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
curl_close($ch);
return $result;
}
$url_create = ''.$siteInfo->site_xtream.'get.php?username='.$byakman->guvenlik($_POST["username"]).'&password='.$byakman->guvenlik($_POST["password"]).'&type=m3u_plus&output=ts';
$result = SaveSipTv($_POST['mac'],$url_create,$_POST['pin']);
if ($result == 'MAC address is not found!') {
echo 0;
} else if ($result == '1 URL added! Restart the App.') {
echo 1;
}
} else if ($type == 2) {
function SaveRoyalIpTv($mac='',$url='')
{
$data = array(
'mac' => $mac,
'url' => $url,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.royaliptvapp.com/php/addMac.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = array();
$headers[] = 'Authority: www.royaliptvapp.com';
$headers[] = 'Pragma: no-cache';
$headers[] = 'Cache-Control: no-cache';
$headers[] = 'Accept: */*';
$headers[] = 'Sec-Fetch-Dest: empty';
$headers[] = 'X-Requested-With: XMLHttpRequest';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36';
$headers[] = 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8';
$headers[] = 'Origin: https://www.royaliptvapp.com';
$headers[] = 'Sec-Fetch-Site: same-origin';
$headers[] = 'Sec-Fetch-Mode: cors';
$headers[] = 'Referer: https://www.royaliptvapp.com/myList.html';
$headers[] = 'Accept-Language: tr,en;q=0.9';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
return $result;
}
$url_create = ''.$siteInfo->site_xtream.'get.php?username='.$byakman->guvenlik($_POST["username"]).'&password='.$byakman->guvenlik($_POST["password"]).'&type=m3u_plus&output=ts';
$sonuc = trim(SaveRoyalIpTv($_POST['mac'],$url_create));
if ($sonuc == mb_strtoupper($_POST['mac'])) {
echo 1;
}else{
echo 0;
}
}
}
}
?>

52
yaren/app/_search.php Normal file
View File

@@ -0,0 +1,52 @@
<?php
session_start();
if ($_SESSION["login"] != true AND $_SESSION["user_info"] == "") {
header("Location: index.php");
exit();
} else {
header('Content-Type: application/json');
include("../conf/functions.php");
$data = array();
$query = $_POST["query"];
$livetv = $byakman->player_api2($byakman->userInfo('username'), $byakman->userInfo('password'), "get_live_streams", "");
$getLive = json_decode($livetv, true);
$lv = array();
$d = 0;
foreach(@$getLive AS $gl) {
$lv[$d]["name"] = $gl["name"];
$lv[$d]["id"] = $gl["stream_id"];
$d++;
}
$movies = $byakman->player_api2($byakman->userInfo('username'), $byakman->userInfo('password'), "get_vod_streams", "");
$getMovies = json_decode($movies, true);
$mv = array();
$m = 0;
foreach(@$getMovies AS $gm) {
$mv[$m]["name"] = $gm["name"];
$mv[$m]["id"] = $gm["stream_id"];
$m++;
}
$series = $byakman->player_api2($byakman->userInfo('username'), $byakman->userInfo('password'),"get_series", "");
$getSeries = json_decode($series, true);
$sr = array();
$s = 0;
foreach(@$getSeries AS $gs) {
$sr[$s]["name"] = $gs["name"];
$sr[$s]["id"] = $gs["series_id"];
$s++;
}
echo json_encode(array(
"status" => true,
"error" => null,
"data" => array(
"livetv" => $lv,
"movies" => $mv,
"series" => $sr
)
));
}