I init a download for a user via http before the file is finished growing. (if i wait till it's done growing it will take 2 minutes)
problem is that the below method only serves the file up to the point when i opened it. say 2-10 megs but the file ends up being 400 megs.
Code:
header('Content-Type: application/x-zip');
$fp = fopen("C:\\Apache\\htdocs\\{$new_file}", "rb");
while(!feof($fp)){
$buf = fread($fp, 2048);
print $buf;
}
Does anyone have a way to keep serving the file until it's complete..
when is it complete? no idea ....