Reply
Accessing Password Protected Directories
Old 12-31-2008, 09:11 PM Accessing Password Protected Directories
portkey's Avatar
Experienced Talker

Posts: 39
Name: Erica Dion
Trades: 0
So I'm looking to password protect my directories and/or file using a .htaccess file. What I'm curious to know is if there's a way to access these files through code without displaying the annoying popup box. My main code is PHP.

Essentially I have files that can be downloaded that shouldn't be accessed by anyone not logged. I plan to password protect them but I'd like the login username/password to all be done invisibly so that if they are logged in it will begin the download, and if they're not it will display another page.

Any help or tips would be great! Thanks
portkey is offline
Reply With Quote
View Public Profile Visit portkey's homepage!
 
 
When You Register, These Ads Go Away!
Old 12-31-2008, 09:24 PM Re: Accessing Password Protected Directories
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
Won't happen "invisibly" with .htaccess security.

Use PHP and cookies/sessions
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-31-2008, 11:49 PM Re: Accessing Password Protected Directories
portkey's Avatar
Experienced Talker

Posts: 39
Name: Erica Dion
Trades: 0
Well I have that as well to handle the UI stuff but what I'm looking for is a way to protect it so that you can't copy the URL to somebody and have them download it as well without the proper permissions. Is this even possible with any type of coding?
portkey is offline
Reply With Quote
View Public Profile Visit portkey's homepage!
 
Old 01-01-2009, 09:09 AM Re: Accessing Password Protected Directories
chrishirst's Avatar
Super Moderator

Posts: 22,260
Location: Blackpool. UK
Trades: 0
What's to stop people sharing their login details?

Setting the download URL to a page that checks for a logged in user then starts the download, without ever exposing the actual download URI is about as close as you can get.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-02-2009, 01:29 PM Re: Accessing Password Protected Directories
anderswc's Avatar
Super Talker

Posts: 132
Name: Will Anderson
Location: Terre Haute, IN
Trades: 0
Another way of protecting downloads might be to only allow a user to download something once. This might be more trouble than its worth though.
__________________
Will Anderson
It's An Anderson | Twitter | Anderson Web Solutions
anderswc is offline
Reply With Quote
View Public Profile Visit anderswc's homepage!
 
Reply     « Reply to Accessing Password Protected Directories
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting 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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.12536 seconds with 13 queries