Place the meta data of the file in a database, and the files outside the webroot then use a combination of proper headers and a call to readfile() in your code to allow for download.
http://php.net/readfile <- have not looked there but this should have some sample code in the notes HTH Tarique On Jan 2, 2008 6:24 PM, Bart <[EMAIL PROTECTED]> wrote: > > Hi! > (i'm a newbe) > I want my site-visitors to be able after login to download an (audio/ > image)file that is only for them. > I have two options: > uploading the files into the database or uploading the files onto > the server in a folder with filedata in the DB. > > The first has the advantage of security but I have some problems with > displaying the image after download (corrupted/characters are > displayed instead of a pretty picture) > The second has the advantage of transparancy/no corruption so far, but > how do I secure files? Placing them in the webroot makes them publicly > accessible. > > Which structure do you advice? > Can you give me a direction/some keywords I should look into? > > Cheers, > Bart > > > > -- ============================================================= Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com ============================================================= --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---