I'm using PHP, Apache in Linux server. I've expensive based video player. When video begin to play and expensive attempt to download movie, server could not reaction to another demands. In other word I would like terminate installing when user click to the site link. my video downloa is working by follow code:

$fp = fopen($real, "r");
header('Cache-Control:');
    header('Pragma:');header('Expires:');
     header('Accept-Ranges: bytes');
     $fs = stat($real);
    header('Content-Length: ' . $fs['size']);//mtime
    header("Last-Modified: ".gmdate("D, d M Y H:i:s", $fs['mtime'])." GMT"); 
  header('Content-Type: ' . $ext);
    while (!feof($fp)) {
        echo fread($fp, 65536);
        flush();
    }
    fclose($fp);
    exit;