title: Password protected directory and files in PHP
body: <p>Im creating a simple private page with links to some files to download. I've done it with simple session management but I have a problem: if somebody click on the file-url he can download the file without the authentication. So what I can do to avoid this? I can make a HTTP Authentication but I want a custom login form and not the window popping out.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>