Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 54
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!
 
 
Register now for full access!
Old 12-31-2008, 09:24 PM Re: Accessing Password Protected Directories
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Won't happen "invisibly" with .htaccess security.

Use PHP and cookies/sessions
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
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
Skilled Talker

Posts: 54
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
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
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!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
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

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
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.17803 seconds with 12 queries