I\'m working on a more secure streaming method for our video player. Because each file requires special token authentication and also only allows each token to be loaded once, I
Fully Functional Code
$file = "z.mp4"; $length= filesize($file); $offset = 0; $f = fopen($file, 'r'); stream_get_contents($f, $offset); $pos = 0; while($pos < $length){ $chunk = min($length-$pos, 1024*8); echo fread($f, $chunk); flush(); ob_flush(); $pos += $chunk; }