forked from TUM-Dev/RBGreaterAgain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwatch.php
More file actions
25 lines (21 loc) · 646 Bytes
/
watch.php
File metadata and controls
25 lines (21 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
include_once 'vendor/autoload.php';
include_once 'language.php';
include_once 'api/get_rbg_stream_site.php';
include_once 'api/ShortLinkAccess.php';
$link = ShortLinkAccess::getVideoUrl($_GET["s"]);
$loader = new FilesystemLoader('tmpl');
$twig = new Environment($loader);
if (strlen($link) > 0) {
$data = ParseInformation($link);
if (isset($_GET["video_only"])) {
echo $twig->render('video_only.twig', $data);
} else {
echo $twig->render('watch.twig', $data);
}
} else {
header("HTTP/1.0 404 Not Found");
echo $twig->render("404.twig");
}