authentication with httaccess for a folder but goin with php

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
zartanyan
Forum Newbie
Posts: 1
Joined: Tue Aug 31, 2004 1:36 pm

authentication with httaccess for a folder but goin with php

Post by zartanyan »

hello

for a new project i should use php for user authentication with database (so much member) but these members can take files from "http authenticate folder" in apache servers.

so to do this they should put the write name and pass (in the password file of apache) but i dont want to show users the servers authentication screen :). how can i do that

here is

Code: Select all

<?php
$head="GET /ddd.wmv HTTP/1.1\r\n"."Host: localhost\r\n".
"Connection: Keep-Alive\r\n"."Authorization: Basic ZGlybWFua2VuOjI2NzYyNw==\r\n\r\n";
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30); 

// code for reading and outputing to the client


?>

i can do like this but i dont want to do like this because it is hard for the server. do you know how ican.

thanks
?>
Post Reply