1

Possible Duplicate:
HTTP authentication using PHP authentication

Hi. I'm making a members area for my site and I have it already running. I authenticate members using mysql and php and this works really well.

But now problems occurs, I would like to offer members a possibility to upload files to the systems, and those files should be available ONLY to logged in members.

I know I could store those files to a database or even in a filesystem and serve them throught php, BUT this will get very heavy for the server when members upload bigger files. Those files might be even 20MB or even bigger.

Community
  • 1
  • 1
Mostafa Elkady
  • 5,645
  • 10
  • 45
  • 69

1 Answers1

1

His question is how to make those files unavailable to users who are not authenticated (I supppose).

Storing files themselves in databases is a very bad idea. Just put them in an unaccessible directory (ie: use .htaccess to restric access) and serve them using PHP. The additional load on the server in doing so (if done correctly) is minimal.

quantumSoup
  • 27,197
  • 9
  • 43
  • 57