|
|
Posted by Lado.Leskovec on 12/21/07 07:50
On 20 dec., 21:40, "Sanders Kaufman" <bu...@kaufman.net> wrote:
> It looks like you're using the wrong method - basic.
> You should be using NTLM for a win32 login.
>
> <Lado.Lesko...@gmail.com> wrote in message
>
> news:fc1b676b-2df3-437a-b239-e1e3eb4e6433@s12g2000prg.googlegroups.com...
>
Well, I was using NTLM when I used this code segment: http://www.iau5.com/ntlm.php.txt
and this is still the approach I'm most fond of, but get_headers($url)
doesn't seem do the same as apache_request_headers() do and thus I
don't get the final $LocalUser that I'm after...
If I use it, the login screen pops up 3 times (perhaps it is
handshaking or you only get 3 tries... I don't know). If I put
anything in the function after the get_headers... like echo "test"; it
outputs it on screen, but dies at:
if (!isset($headers['Authorization'])){
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: NTLM');
exit;
}
the reason is probably the exit at the end... I guess
$headers['Authorization'] is not set...
Also one more note: I guess it does log me in or something, because if
I use the login i have for domain it continues executing after the
get_headers (and exits in the segment i posted above) and if I enter
blablabla it says You are not authorized to view this page...
Navigation:
[Reply to this message]
|