header("Content-Disposition: attachment; filename=\"" . $zipname . "\"");
    header("Content-Transfer-Encoding: binary");
    set_time_limit(0);
    ob_end_flush();
    @readfile($zipname);
    /*
    $download_rate = 20.5;
    header('Cache-control: private');
        header('Content-Type: application/octet-stream');
        header('Content-Length: '.filesize($zipname));
        header('Content-Disposition: filename='.$zipname);
    
    
        flush();
        $file = fopen($zipname, "r");
        while(!feof($file))
        {
            // send the current file part to the browser
            print fread($file, round($download_rate * 1024));
            // flush the content to the browser
            flush();
            // sleep one second
            sleep(1);
        }
        fclose($file);
    */
    $dataprocess->Log($_SESSION['fullname'], $_SESSION['user_log'], $file);
    $dataprocess->disconnectDb();
} else {
    exit("Could not find Zip file to download");
}