php - How to protect an url video streaming using flumotion? -
this scenario: have localhost website logged in users can visit. stored on mysql database. server side running php. inside website have video player plays video localhost flumotion video streaming server.
i want protect video streaming url in order registered users can access it. if copy video url, won't able play outside website.
how can it?
edit: mean "video url" url this: 192.168.1.221/myvideo.mp4 (my flumotion video streaming running on localhost) url html5 video player get. , want protect copy , paste in browser tab. because if it, can play without need website.
you check if user logged in, checking if session set depending on how login system works.
function is_logged_in(){ if (!isset($_session['you_session_name']))//user not logged in.. return false; return true; }
then in video page check if user logged in, , if it's not redirect him on page:
if (!is_logged_in()) header("location: http://redirectsite.com/page");
Comments
Post a Comment