title: Create temporary file and auto removed
body: <p>I am writing a anti-leeching download script, and my plan is to create a temporary file, which is named by session ID, then after the session expires, the file will be automatically deleted. Is it possible ? And can you give me some tips how to do that in PHP ?</p>
  
  <p>Thanks so much for any reply</p>