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(); $error = "Username or Password is invalid"; } $user = User::where('username', '=', $username)->where('password', '=', $password)->where('active', '=', 1)->first(); } if($user->exp_date != "0000-00-00") { if($user->exp_date <= Carbon::today()) { } } $stream = Stream::find($id); } $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); break; } }