mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
18 lines
589 B
PHP
18 lines
589 B
PHP
<?php
|
|
global $global, $config;
|
|
if (!isset($global['systemRootPath'])) {
|
|
require_once '../videos/configuration.php';
|
|
}
|
|
session_write_close();
|
|
header('Access-Control-Allow-Origin: *');
|
|
header("Access-Control-Allow-Headers: Content-Type");
|
|
header('Content-Type: application/json');
|
|
if (empty($_GET['users_id'])) {
|
|
die("You need a user");
|
|
}
|
|
|
|
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
|
require_once './playlist.php';
|
|
header('Content-Type: application/json');
|
|
$row = PlayList::getAllFromUser($_GET['users_id'], false);
|
|
echo json_encode($row);
|