Authentication the other way around...

From: Date: Wed, 13 Sep 2000 13:15:48 +0000
Subject: Authentication the other way around...
Groups: php.general 
Request: Send a blank email to php-general+get-16553@lists.php.net to get a copy of this message
Hi all :o) I am having a problem with what to send and how, to the apache server... What i wanna do is have my own php-login form, and when a user logs in, he goes into a .htaccess area... Now i get the apache pop-up saying plz enter username and password, but i want the script to make sure the users has been authorized for the realm... that's what I can't figure out... I found this script: function GetFromHost($host,$path) { $fp = fsockopen($host,80); set_socket_blocking($fp, true); fputs($fp,"GET $path HTTP/1.0\r\nAuthorization: Basic ".base64_encode("username:password")."\r\n\r\n"); while(!feof($fp)){ $string .= fgets($fp,1024); } fclose($fp); return $string; } And it works just fine... now I just want the apache to remember that i logged in, so I don't get the apache realm login again... Is it the ip-adress or something, that should be send with it? :o) Thnx very very very much for any help :o) Dan Larsen

« previous php.general (#16553) next »