Welcome to World of IPTV

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Forum Rules

Our Rules: Read to avoid getting banned!

Advertising

Introduce Yourself to the World with Us!

Resource Database

Find the newest resources around IPTV!

Account upgrade

Upgrade your account to unlock more benefits!

Protect streams with a small php script

zeri

Extended Member
Ext. Member
Joined
Oct 2, 2019
Messages
34
Reaction score
111
Points
44
Location
bh
Hi folks

not sure if you need this however i made a small php auth script for stream authentication on flussonic

just create a file in /home/ and add password which will be used for authentication.

scriot is below, if you have any questions let me know

in order to authenticate just add ?token=your password in the end of the stream line (regardless of type)


<?php
$get = print_r($_GET, true);
$token = $_GET["token"];
if(!$token || !strlen($token)) {
header('HTTP/1.0 403 Forbidden');
error_log("No token provided", 4);
die();
}

$tokens = array();
$contents = explode("\n", file_get_contents("/home/auth.txt"));
foreach($contents as $line) {
if(strlen($line) > 3) {
$parts = explode(":", $line);
$tokens[$parts[1]] = $parts[0];
}
}


if($tokens[$token]) {
header("HTTP/1.0 200 OK");
header("X-UserId: ".$tokens[$token]."\r\n");
header("X-Unique: true\r\n"); // Turn this on to protect from multiscreen
} else {
header('HTTP/1.0 403 Forbidden');
}
?>
 
Last edited:
i really don't understand, can you please explain for me clarification?
 
pretty simple you need a web server and ph, place the content in the web root folder for example /var/www/auth.php

in flussonic put external authentication url to http://yourserver/auth.php

create a file on the web server in /home/auth.txt in which you put the username or token for authentication

when pulling stream you add ?token=somepassword on the end otherwise it wont work..
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
pretty simple you need a web server and ph, place the content in the web root folder for example /var/www/auth.php

in flussonic put external authentication url to http://yourserver/auth.php

create a file on the web server in /home/auth.txt in which you put the username or token for authentication

when pulling stream you add ?token=somepassword on the end otherwise it wont work..
Still haven't figured it out... I'm using flussonic 4.5.18 will this work with it?
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
lol
this example is in the documentation

Right, isnt a forum to share cross knowladge? did I take any credit? I just put it here cause I think that not everyone runs around all sites and searchses for help.
 
Hey, i want to know if theres any script to protect my streams on xtream ui panel
 
Hey, i want to know if theres any script to protect my streams on xtream ui panel
The panel itself… if a user is leaking your streams etc… then that’s your issue lol!

Limit users to certain IPs and user agents etc…
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changcdn
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top