Hola a todos es que ando tratando de poder esconder los archivos m3u8
ahora bien estoy usando nginx para poder localizar mi archivo
rewrite ^/(.*)/(.*)/(.*)$ /stream.php?username=$1&password=$2&stream=$3 break;
pero como quiera obtienen el link directo del archivo
mi archivo stream.php
Código PHP:
Ver original<?php
include ("config.php");
use Carbon\Carbon;
$ip = $_SERVER['REMOTE_ADDR'];
$username=$_GET['username'];
$password=$_GET['password'];
$id=$_GET['stream'];
$setting = Setting::first();
if (empty($_GET['username']) || empty($_GET['password'])) { $error = "Username or Password is invalid";
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found'); header('Status: 404 Not Found'); }
$user = User::where('username', '=', $username)->where('password', '=', $password)->where('active', '=', 1)->first();
if (!isset($_SESSION['user_id'])){ // TODO: secret key }
if($user->exp_date != "0000-00-00") {
if($user->exp_date <= Carbon::today()) {
}
}
$stream = Stream::find($id);
if (!isset($_SESSION['user_id'])) { // TODO: secret key }
($stream->status != 1 ?
die() : "");
$user->lastconnected_ip = $ip;
$user->last_stream = $stream->id;
$user->useragent = $_SERVER['HTTP_USER_AGENT'];
$user->save();
$url = $stream->streamurl;
$file = "http://".$setting->webip.":".$setting->webport."/".$setting->hlsfolder."/".$id."_.m3u8";
if($setting->less_secure) {
}
$streamo = (($stream->restream == true) ? $url : $file);
$fd = fopen($streamo, "r"); echo fread($fd, 1024 * 5); break;
}
}