Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > setting up user downloads

setting up user downloads
Thread Tools
Fresh-Faced Recruit
Join Date: Jul 2002
Status: Offline
Reply With Quote
Feb 18, 2004, 04:11 PM
 
I have a problem that I'm not sure how to tackle, so I figured I'd state my requirements, and see if anyone could offer me some suggestions.

My boss wants a facility on our website that allows customers to login and download files. He wants to be able to assign specific users specific privileges, so they can only see and download certain files.

A low-tech solution would be to stick all the files in an randomly named directory (i.e. /dir2384mbhbb23/ ) and have a PHP interface to handle the password part, then giving the customer a link to the file. While this works for less tech-savvy customers, anyone who understands websites would realize they could go to this directory directly and get at files, without needing a password.

Another option is the DIR Protection in my site control panels (with .htaccess files) . . . but I'm trying to setup a system that's independent of me. My boss would be the one administering all of this, and I'd prefer it through an interface I setup in PHP, not through the site control panel. It would be great if I could setup this .htaccess stuff through PHP, but I don't know how to do that, or if its possible (so any advice there would be especially appreciated).

Anyway, if anyone knows of any other possible solutions, I'd really appreciate the help.

Thanks,
-Kunal
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Feb 18, 2004, 04:38 PM
 
Do a search on sourceforge for php htaccess (require all words)
Travis Sanderson
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 18, 2004, 05:24 PM
 
Don't muck around with .htaccess and other insecure methods. Do it right the first time.

Set up a MySQL database with users and passwords, as well as a table for user permissions and groups.

Set up another table that holds information for each file, its type, its size and a lookup field that describes the permissions for that file (all groups, selected groups, etc).

Next you need to create two interfaces - a 'public' site that requires a user to login (and thus determine which groups they belong to), and an 'admin' site that allows you to administer the files, users, groups, etc...

This is the bare minimum framework you need to make some sort of semi-secure document 'vault'. If you use this as a working spec of the system you need, you'll find that both www.hotscripts.com/PHP/ and sourceforge will have projects that more or less suit your needs, and if you know PHP well you can obviously alter these projects to suit your needs.

If you do anything less, it's a waste of your time and a waste of your boss' time because you'll end up with a product that has so many flaws in it you'll constantly need to revisit it to make it work as expected.
Computer thez nohhh...
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Feb 19, 2004, 10:34 AM
 
you can do that really easy with Dreamweaver, Simon. i spent the day writing about it yesterday
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Feb 19, 2004, 06:28 PM
 
Originally posted by philzilla:
you can do that really easy with Dreamweaver, Simon. i spent the day writing about it yesterday
How's that then? Got any links? Explain yourself, sir!
Computer thez nohhh...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:00 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2