-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGET_Youtube_Live_Streams_M3U.php
30 lines (28 loc) · 1.04 KB
/
GET_Youtube_Live_Streams_M3U.php
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
26
27
28
29
30
<?php
// Youtube VLC Structure
// http://albdroid.al/api
// TO PLAY YOUTUBE LINKS ON VLC JUST INSTALL playlist_youtube.lua FROM https://github.com/SxtBox/VLC_Player_Streaming_Data_AIO [USE Automatic Installer.bat]
ob_start();
error_reporting(0);
date_default_timezone_set("Europe/Tirane");
include "db_connection.php";
$select_data = ("SELECT * from streaming where category = 'Youtube Live Streams'");
$result = mysqli_query($conn,$select_data);
echo "#EXTM3U Albdroid Streaming"."\n\n";
while( $row = mysqli_fetch_array($result))
{
$stream_id = htmlentities($row["stream_id"]);
$stream_title = htmlentities($row["title"]);
$stream_url = $row["link"];
//$stream_url = str_replace('https','http',$stream_url);
$stream_thumbnail = $row["thumbnail"];
$stream_fanart = $row["fanart"];
$stream_description = htmlentities($row["description"]);
$stream_category = $row["category"];
header('Access-Control-Allow-Origin: *');
header('Content-type: application/json');
echo "#EXTINF:-1,$stream_title"."\n";
echo $stream_url."\n\n";
}
ob_end_flush();
?>