PHP

Serving a large file through PHP without hitting memory_limit

Ran into a little problem hitting the memory limit for PHP when serving 100MB+ files through a script like:
$file = @fopen($filename,”r”);
if ($file)
{
while(!feof($file))
{
    print(fread($file, 1024*4));
    flush();
[...]