UPDATE: I have it working the way you suggested weedpacket, thanks. But I wanted to try and use headers so that the download.php page isn't actually visited. Instead when the user clicks on the link to download the file that points to download.php?id=1 I would use header() to instantaneously start the download and the user doesn't have to leave their current page.
I coded up this based on examples I found:
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: private',false);
header("Content-Type: application/zip");
header("Content-Disposition: attachment; filename=".basename($dlinfo['zip_path'])."");
header('Content-Transfer-Encoding: binary');
readfile($dlinfo['zip_path']);
It downloads a zip file with the proper name from the path but the file is not a valid archive. I've verified that if I just echo the $dlinfo['zip_path'] to a href text link and click on it, it will work just fine. Is there some trick to user header() to force a download that I'm missing?