Afficher un message
Vieux 02/03/2008, 21h26   #9
raj
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: using php to accesss .htaccess protected directories

On 2008-03-02 20:00:48 +0000, Mango <mango@removethis.toao.net> 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


Hi Mango,

My setup is a website that is partly protected by one htaccess master
password. I have various users and would like to monitor each of them.
I give each of them a username and password not connected to the master
htaccess password. Each time they successfully login they should be
able to access the htaccess protected page without knowing the master
htaccess username and password. I would like to do this by using a
script to forward them to the password protected pages once they click
a link to it. I was hoping to do someting like

file_get_contents('http://user:password@example.test/protected/');

but that doesn't work or I'm not doing it correctly.

Any and advice would be greatly appreciated.

Thank you in advance,

Raj

  Réponse avec citation
 
Page generated in 0,05247 seconds with 9 queries