1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/plugin/Live/keyInfo.php
2022-01-06 21:30:01 +08:00

29 lines
638 B
PHP

<?php
require_once '../../videos/configuration.php';
$pobj = AVideoPlugin::getDataObject("Live");
if (empty($_REQUEST['key'])) {
die("We need a Key");
}
if (!User::isAdmin()) {
die("Login as Admin first");
}
//header('Content-Type: application/json');
$row = LiveTransmition::keyExists($_REQUEST['key']);
if (!empty($row)) {
if (empty($_REQUEST['json'])) {
foreach ($row as $key => $value) {
echo "<b>{$key}</b> {$value}<br>";
}
} else {
header('Content-Type: application/json');
echo json_encode($row);
}
} else {
echo "Key not found";
}
//echo json_encode($row);