file ID instead of url?
View Single Post
03-08-2010, 04:47 AM
Join Date: Sep 2007
Using a META redirect is still giving them a direct link to the file, you don't even need any advanced tools to get the link to that one.
Why do you want to avoid using an SQL database? A good database is generally the foundation of a worthwhile dynamic script. Any other method to store data would be slower and less efficient.
There are two ways to separate the client from the content. The first is to use a database to store the files, this is not really a good method. The next is to store them below the webroot (thus no URI to access it) and use a script to bring it up if the correct accidentals are given. The first thing you do is have some sort of database (mysql, xml, it really doesn't matter) to link the IDs to the file locations on the hard drive. Next you find the ID, verify the credentials are correct then write that file to the output stream along with the meta data. I've done this in both PHP and .net where file security was an absolute must (the .net one was for a mortgage bank).
I couldn't find a tutorial on google for this (about 2 minutes of looking), but the function that reads the file is
. If you are on a shared server and can not put files below the webroot, pick one above the webroot but use .htaccess to deny all. I wouldn't use this workaround (or a shared server at all) for anything that would be considered a major security breach should it fail.
View Public Profile
Send a private message to Village Idiot
Find More Posts by Village Idiot