title: Block direct access to a file over http but allow php script access
body: <p>I'm loading my files (pdf, doc, flv, etc) into a buffer and serving them to my users with a script.  I need my script to be able to access the file but not allow direct access to it.  Whats the best way to achieve this?  Should I be doing something with my permissions or locking out the directory with .htaccess?</p>