haha, I know the feeling🙂
$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);
It doens't reload the teh calling page, but... hope it helps.