Uploading the new files

This commit is contained in:
Komfudo Richman 2023-04-15 17:12:02 +02:00 committed by GitHub
commit 3bd33206c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

12
index.php Normal file
View file

@ -0,0 +1,12 @@
<?php
header("Content-Type: text/plain;charset=UTF-8;");
$url = "http://" . $_SERVER['HTTP_HOST'];
echo "[playlist]\n";
echo "File1=" . $url . "/render/?q=http%3A//example.com/stream/index.m3u8&site=iptv\n";
echo "title1=Example\n";
echo "Length1=9999999\n";
echo "File2=" . $url . "/render/?q=http%3A//piratemoviesidk.net/TVorwhatever/index.m3u8&site=iptv\n";
echo "title2=Example 2\n";
echo "Length2=9999999\n";
?>

25
render/index.php Normal file
View file

@ -0,0 +1,25 @@
<?php
if ($_REQUEST['site'] == "iptv") {
$video_url = urldecode($_REQUEST['q']);
} else {
$video_url = "";
}
header("Content-Type:application/octet-stream");
if (!empty($video_url)) {
$cmd = "ffmpeg -i " . escapeshellarg($video_url) . " -movflags frag_keyframe+empty_moov -f ismv -bsf:a aac_adtstoasc -vf scale=640:480 -";
} else {
echo "Invalid request.";
exit();
}
flush();
$handle = popen($cmd, "r");
while (!feof($handle)) {
echo fread($handle, 8192);
flush();
}
pclose($handle);
?>