SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Password protection...

    Users must log into my site with a id/password combo that is checked against a database. I have some directories that are protected via .htaccess files. The thing is, I do not want the client to have to log into the site, and log in again if they want to see a private document...

    Possible?
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Start using sessions...
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using sessions...
    The thing is, the person has to log in in order to see a list of files(scripting level authentication), then if they want to view or download a file, they have to get to it through the .htaccess (server level authentication). I do not want the user to have to put in a user name and password more than once per session.
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  4. #4
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When a user has supplied a valid username and password you can store the username and password variables in the session

    Sean

  5. #5
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And when the client computer trys to access a file that is protected via .htaccess it prompts the user for a username and password. Is there certain variable that I can store them as so they are automaticaly passed to the server?
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  6. #6
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but it is not secure. You actually put the username and password in the url like this :

    [EDIT] vBulletin screwed the url up. It is the following but with no spaces :

    http:// username : password@ www.yoursite.com/yourfile.zip

    Sean
    Last edited by seanf; Jun 27, 2001 at 11:44.

  7. #7
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats what I was looking for. Thank you very much...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •