title: Download only by Session
body: <p>Assume i want to host some <code>pdf</code> files, under a certain directory on my server (e.g. <code>domain/myfiles</code> ). For that reason i create a unique - hard to guess - link, using some common php functions and then put the file inside this certain directory ( <code>domain/myfiles/hardToGuessHash.pdf</code> ). </p>
  
  <p>However if someone access my server through <code>domain/myfiles/hardToGuessHash.pdf</code> he will be able to see and download this file. </p>
  
  <p>Is there any way, to require <code>session access</code> in advance, in order to stop unauthorized access on my documents ? I searched on StackOverflow but i really did not come up with something.</p>
  
  <p><em>Clarification</em> : I do not want to hide the download link. I want to require verification for download. For example, if a person A -that has download rights on the file- copies-pastes the download link on a person B, then person B should not be able to download the file, just from the link !</p>
  
  <p>Thanks ! </p>