Nachtrag:
Hier der Code des Skriptes.
$headers = apache_request_headers();
if($headers['Authorization'] == NULL)
{
header( "HTTP/1.0 401 Unauthorized" );
header( "WWW-Authenticate: NTLM" );
};
if(isset($headers['Authorization']))
{
// hier folgt dann der Teil, wo der Username aus dem übermittelten String herausgezogen wird und in $login gespeichert wird - hat irgendein Franzose geschrieben
}
if ($login == "")
echo "Ich kenn dich nicht ... :-(\n";
else
echo "Hallo $login!\n";
Wenn ich ein print_r(apache_request_headers()) mache, gibt er mir lokal aus:
Array
(
[Accept] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
[Accept-Encoding] => gzip, deflate
[Accept-Language] => de
[Authorization] => NTLM TlRMTVNTUAADAAAAGAAYAG4[...]
[Connection] => Keep-Alive
[Host] => 127.0.0.1
[User-Agent] => Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
)
Aber im Intranet:
Array
(
[Accept] => */*
[Accept-Encoding] => gzip, deflate
[Accept-Language] => de
[Connection] => Keep-Alive
[Host] => 113.49.51.143
[Pragma] => no-cache
[User-Agent] => Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
[X-BlueCoat-Via] => 4F0ED251D7760D1D
)
ohne Authorization.
Der Yeti
Habe nun, ach! WInfo, BWL, und Mathe, Und leider auch Info!
Durchaus studiert, mit heißem Bemühn. Da steh' ich nun, ich armer Thor!
Und bin so klug als wie zuvor!