Hello!
Well i’ve worked my way through making a system for dynamic content creation and now I need to make it available for download in one single file. But it would be a waste of space if I create a file every time a user wants to download the info so I am thinking in a temp file, after the user has downloaded it then just delete it.
I know how to create a text file (I think) but im not sure of how to set the deletion of it and im not exactly talking about the unlink function.
Suppose a user runs the search and gets the results and clicks the download button but goes for a cup of coffee, if I name the temp file always the same then another user could run a search in the site and overwrite the temp file before the first user actually downloads it and that is not cool.
To fix this I will name each temp file with a ‘unique’ number (based on seconds and time stuff) but in doing so I would surely need to delete them after download.
How do you think I could work this out?
thanks!