PHP + .htaccess

Posted on Saturday 19th May 2007 at 12:17 AM
Diablosblizz
Diablosblizz's Avatar
Alright, this might be a long post, and I don't know if this is even possible. Heres what I want to do:

I want to fopen a folder, which is password protected by .htaccess. Now, when I try to open the folder, I get this message:

Code
Warning: fopen(https://myip/forbidden/database/vouchers) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/diablosb/domains/hotelmario.info/public_html/members/shop.php on line 25



I think what that means, is that when the server is trying to open the folder, it is being asked to enter the username and password, which is not poping up.

The reason I am password protecting it is because there is important files there, they NEED to be there.

My question is:

How do I get php to open the folder using the username and password I put in the .htaccess.

I really hope that this is possible and compatible with fopen.

Thanks!!
Login or register to respond to this forum topic.