PHP Scripts Development » PHP Classes Support Forum » Access_user Class Support forum

[sticky]

Protecting directories with Access_user

(2 posts)

Great offers not only for geeks!


  1. Some users asked me before how to protect files inside a directory with the Access_user class. I think most of them think about the protection in a way like a protection using .htaccess.

    Actually you need some more:

    1. Protect the directory with .htaccess (the login/password) is secret to all users)
    2. You need a download script to get this files from that directory (PHP doesn't need to login and will send the data to the browser).
    3. Protect this download script with the Access_user class, the visitor has to login first before he is able to access those file

    If you follow these steps you have a solution with a web based authentication system and protected content using htaccess.

    Posted 6 months ago #
  2. User has not uploaded an avatar

    cioop
    Member

    Hi,
    It's a great tool you've written - and I think I may use it, if I solve one problem.

    I'm using the extra_info field,and I would like to make the DEFAULT_ACCESS_LEVEL a variable which value would depend on the particular the extra_info field having been filled.

    To present it simpler - I need it to work somehow like that:

    if extra_info !='' {
    DEFAULT_ACCESS_LEVEL = 2;
    } else {
    DEFAULT_ACCESS_LEVEL = 1;
    }

    so that the user who have submitted extra_info would have higher access_level parameter in the database

    And also how to change the data charset to UTF as my db is UTF8 and the submitted data look like "Ä™" or "Å‚" (I've tried to save the files in utf charset and changed <head> <meta charset/> but it doesn't seem to work properly?)

    But itsa great script anyways, thanks

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.