src/FileStreamer.php
/**
     * Flush buffered content of the file to the client.
     *
     * The start and end of the content are defined by the methods parameters.
     * The values of the parameters are treated as number of bytes from the beginning of the file to serve.
     *
     * @param   int  $start  Start of the content.
     * @param   int  $end    End of the content.
     *
     * @return void
     */
Flush buffered content of the file to the client.
The start and end of the content are defined by the methods parameters.
The values of the parameters are treated as number of bytes from the beginning of the file to serve.

@param   int  $start  Start of the content.
@param   int  $end    End of the content.

@return void
Flush buffered content of the file to the client . The start and end of the content are defined by the methods parameters . The values of the parameters are treated as number of bytes from the beginning of the file to serve . @param int $start Start of the content . @param int $end End of the content . @return void
private function flush(int $start, int $end): void
    {
        $done = false;
        fseek($this->filePointer, $start);
        while (!$done && connection_status() == CONNECTION_NORMAL) {
            ini_set('max_execution_time', '30');
            echo @fread($this->filePointer, min(1024, $end - $start + 1));
            ob_flush();
            flush();
            $done = feof($this->filePointer) || ftell($this->filePointer) >= $end;
            usleep($this->delay);
        }
    }
private function flush ( int $ start , int $ end ) : void { $ done = false ; fseek ( $ this -> filePointer , $ start ) ; while ( ! $ done && connection_status ( ) == CONNECTION_NORMAL ) { ini_set ( 'max_execution_time' , '30' ) ; echo @ fread ( $ this -> filePointer , min ( 1024 , $ end - $ start + 1 ) ) ; ob_flush ( ) ; flush ( ) ; $ done = feof ( $ this -> filePointer ) || ftell ( $ this -> filePointer ) >= $ end ; usleep ( $ this -> delay ) ; } }
Flush buffered content of the file to the client.
Flush buffered content of the file to the client .