How to "stream" FLV using PHP?
<p>I've a script that is supposed to "stream" a flv (for a flowplayer):</p>

<pre><code>header('Content-Type: video/flv');

$realpath = base64_decode($_GET['file']);
$chunksize = 1 * 1024 * 1024;
$handle = fopen($realpath, 'rb');
$buffer = '';
while(!feof($handle))
{
    set_time_limit(600);
    $buffer = fread($handle, $chunksize);
    echo $buffer;
    ob_flush();
    flush();
}
fclose($handle);
exit;
</code></pre>

<p>it's working for small videos but for bigger ones it's required to refresh the page with the player in order for them to play...</p>
