Hey. I have a question regarding file access which I can't find posts on by searching... I have a directory full of user files, titled by fid (file id) so like
userfiles/1.txt
userfiles/2.doc
userfiles/3.xls
etc....
Some of these files have password protection on them, some don't. I have a general php page: viewFile.php?fid=** to access a file. That page loads up some info about the file, and then it has a link to download the file.
How can I restrict downloads to users going through that page? Like right now anybody can direct their browser to userfiles/1.txt to download the file. How can I make it so only people that successfuly went to viewFile.php?fid=1 (it has a password script on it) can open the file?
Thanks a lot for the help!