Re: [PHP] Advice on maintaining public and private files

2010-02-21 Thread Al
On 2/21/2010 9:11 AM, Kim Madsen wrote: Al wrote on 20/02/2010 19:30: I use Kim's solution and take it one step forward. Htacces files can get lost or corrupted, so No solution to that problem as I see it. In my config file I have the text string. I like the idea, but what if this fi

Re: [PHP] Advice on maintaining public and private files

2010-02-21 Thread Kim Madsen
Al wrote on 20/02/2010 19:30: I use Kim's solution and take it one step forward. Htacces files can get lost or corrupted, so No solution to that problem as I see it. In my config file I have the text string. I like the idea, but what if this file is never accessed? -- Kind regards Kim

Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Al
I use Kim's solution and take it one step forward. Htacces files can get lost or corrupted, so In my config file I have the text string. //region htaccess file text // Code writes to /db folder; Admin mode checks file existence and text; replaces with this if different.

Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Nathan Rixham
Kim Madsen wrote: > Michael Stroh wrote on 19/02/2010 19:19: >> I have a site I'm working on with some data that I want to be >> readable by anyone, but some files that I want to keep hidden from >> outside users. Here is an example of my file structure. >> >> /products/data1/item_1/data.txt >> /p

Re: [PHP] Advice on maintaining public and private files

2010-02-20 Thread Kim Madsen
Michael Stroh wrote on 19/02/2010 19:19: I have a site I'm working on with some data that I want to be readable by anyone, but some files that I want to keep hidden from outside users. Here is an example of my file structure. /products/data1/item_1/data.txt > /products/data2/item_2/data.txt s

RE: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Bob McConnell
From: Rene Veerman > the "proper way" i know of is not the easiest to implement..; > > 1) create a php script that accepts enough parameters to get at your data. > eg: /products/view.php?dataNr=1&itemNr=1 > 2) let that script compare the current user (visitor who's logged in) > to authentication

Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Rene Veerman
1 more thing: doing this right isn't easy. at all. it took me more than a year to "do it properly". you may wanna look around on sf.net for any package that can do this for you. On Fri, Feb 19, 2010 at 7:19 PM, Michael Stroh wrote: > I have a site I'm working on with some data that I want to be

Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Rene Veerman
As far as storing the files, use a seperate subdirectory called "rawData" or something, and place all your files in there, aim for 10 - 5000 files per directory, and keep it logical. But since you want to stop guessers from accessing it, use a randomID() function that you create to generate a rando

Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Rene Veerman
the "proper way" i know of is not the easiest to implement..; 1) create a php script that accepts enough parameters to get at your data. eg: /products/view.php?dataNr=1&itemNr=1 2) let that script compare the current user (visitor who's logged in) to authentication data that tells which it if the

Re: [PHP] Advice on maintaining public and private files

2010-02-19 Thread Bastien Koert
On Fri, Feb 19, 2010 at 1:19 PM, Michael Stroh wrote: > I have a site I'm working on with some data that I want to be readable by > anyone, but some files that I want to keep hidden from outside users. Here is > an example of my file structure. > > /products/data1/item_1/data.txt > /products/dat

[PHP] Advice on maintaining public and private files

2010-02-19 Thread Michael Stroh
I have a site I'm working on with some data that I want to be readable by anyone, but some files that I want to keep hidden from outside users. Here is an example of my file structure. /products/data1/item_1/data.txt /products/data2/item_2/data.txt I would like everything in data1 to be availab