This might be a horrifically stupid question, but how would I go about doing this in PHP:
I’d like to make a .zip file dynamically, then serve it as a download immediately with force-download mime or something, with the contents of $string, with a folder structure.
Premade folder structure license\keys\{$_SERVER['REMOTE_ADDR']}\{$fn}.cf and {$fn}.cf would contain the contents of $string, inside the .zip file
I have literally no idea where to start.
You could use the
ZipArchiveclass. Use it to create a temporaryZIPfile, close theZipArchive, stream the temporaryZIPfile to the user, and delete the temporaryZIP.