I have this dynamic data in PHP, but for each array record, I want to allow a downloadable option to save a zip archive of all records (each as a separate file).
These are actually DNS zone records that are housed in a database. It wouldn't make much sense if they're in a single text file, so I'm looking to somehow have the data exported as separate files inside the zip.
I could save them to disk, but know there's a way in PHP to use the headers to force a download of data as a certain filetype. What I don't know is how to zip that data on the fly. Maybe I can't, and will have to save each to a temp folder, then zip the contents of that folder, then delete the contents after downloaded.
Thought maybe the community might have an idea of where to start. Thanks!