Re: using php to accesss .htaccess protected directories



raj wrote:
Hi mango,

I have some resources (blog, forum, wiki) inside a password protected directory using .htaccess.

I don't want to give out the master username and password to the directory, and I don't want to setup .htaccess with one username and password per user. I have a database of users and want to write a script so that once the users have logged in they can access the protected directory.

Any advice?

Yes. Put all the data on those pages in a database, and use a different name/password system to manage them.



Thank you in advance,

Raj

On 2008-03-02 20:00:48 +0000, Mango <mango@xxxxxxxxxxxxxxxxxxx> said:

Hi Raj,

I'm not quite sure what you're asking. Are you trying to create your own login screen, rather than using the default? If so, I don't believe that is possible, at least not with .htaccess protection.

John's solutions for getting the contents of a protected page using PHP will work, but I take it that's not what you're trying to do?

Mango



raj wrote:

Hi John,

Thanks for the reply. I actually have a website with some of the php/html pages protected by htaccess (username and password). I was wondering is there any way to input the username and password once using a php script so that I can then access that part f the website too?

Thank you in advance.

Raj


.



Relevant Pages

  • Re: comments page with multiple passwords
    ... Yes a discussion forum bulletin board is what you need - each person who signs up ... I think you're referring to the htaccess feature of Unix/Linux servers - it gives ... some protection but it is not foolproof - it pops up the dialogue box you've ... "Enter Network Password and Username" type thing. ...
    (microsoft.public.frontpage.client)
  • Re: using php to accesss .htaccess protected directories
    ... I don't want to give out the master username and password to the directory, and I don't want to setup .htaccess with one username and password per user. ... I have a database of users and want to write a script so that once the users have logged in they can access the protected directory. ... If so, I don't believe that is possible, at least not with .htaccess protection. ...
    (comp.lang.php)
  • Re: using php to accesss .htaccess protected directories
    ... I actually have a website with some of the php/html pages protected by htaccess. ... I was wondering is there any way to input the username and password once using a php script so that I can then access that part f the website too? ...
    (comp.lang.php)
  • Re: [PHP] How do YOU initialize the form variables?
    ... htmlentities has absolutely ZERO protection against SQL Injection. ... and/or HTML). ... //it depends on YOUR business needs for a username ...
    (php.general)
  • RE: Weird Windows logon attempts
    ... I have seen this pattern on repeat occasions and is indicative of virus ... protection on the Windows systems, make sure it updated and running. ... The username has been changed to USERNAME to protect, the hopefully, ... security681 NT AUTHORITY\SYSTEM The logon to account: ...
    (Incidents)