title: How to create a temporary uploaded file and delete it after a period of time
body: <p>Is it possible to store the uploaded file by <code>move_uploaded_file</code> to a directory and mark it to be deleted after a few minutes? I'm trying to make a temporary file stay on the server after a period of time then it will get deleted (only if it's not processed with) so when a file has been uploaded and moved to a directory if it has not been processed (don't worry about this part, this will be done by me) it should delete the file from the server.</p>
  
  <p>There is no way you can keep the temporary file on the server (without using <code>move_uploaded_file</code>) so basically stored in the <code>tmp</code> directory on the server how can I keep the file when uploaded into the temporary directory (or moved to a directory) and "mark" it to be deleted later on if not processed.</p>
  
  <p>I've tried to research how this is possible, but I have not found any type of questions/topics about how to create a temporary file to stay after a limit of time.</p>
  
  <p><strong>EDIT:</strong> To clarify, I do not want the file deleted after the script has finished executing after upload.</p>