I have a program that gzips data, then automaticly ask the user to download it:
$h = fopen($locfilename, "w+b");
fwrite($h, $gzdata);
fclose($h);
$user_agent =strtolower ($_SERVER ["HTTP_USER_AGENT" ]);
header ("Content-type: application/force-download" );
if (( is_integer (strpos ($user_agent ,"msie" ))) && ( is_integer (strpos ($user_agent ,"win" )))) {
header ("Content-Disposition: filename=" .$locfilename );
}
else {
header ("Content-Disposition: attachment; filename=" .$locfilename );
}
header ("Content-Description: File Transfert" );
readfile($locfilename);
(The script does work).
My problem is that becuase it downloads the file, it seems like it isn't reloading the page. I would prefer to stay away from a popup window. If anyone know a way of telling the header to reload after so long that would be nice (I could send it the data w/o the command to ask the user to download the file).
Thank you for any help,
Jim