1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Oinktube/plugin/Live/keyInfo.php
DanielnetoDotCom e4ecd6f3b3
2020-07-05 12:12:56 -03:00

28 lines
No EOL
632 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);