For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > November 2004 > RE: [PHP-DB] Client username









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] Client username
Trevor Gryffyn

2004-11-22, 3:55 pm

First of all, some people may give you a hard time because this isn't
really a database related question. You're better off asking questions
like this on PHP General or even PHP Windows if it's windows specific.

Also.. You need to specify whether you're talking about a Windows login
to a domain, a local windows login (which version of Windows also?), or
something un*x based? There are big differences in how they're all
stored and if they're accessible at all. Also, it's worth noting,
especially in the case of Windows, if the client machine is in the same
domain as the server PHP is running on.


If you have a Windows domain set up, your server is on that domain (or
you have some kind of authentication passthrough to that domain.. I
think there's a way to do that between domains) and the computer that
someone is hitting the PHP server with (the client machine) has a user
logged into the same domain, THEN.. You at least have one option.

If you use NTLM or the NT Challenge/Response type authentication on your
webserver, then the web server will request auth information from the
client's web browser. This will show up in the $_ENV["AUTH_USER"]
variable as well as the $_ENV["LOGON_USER"] variable.

You can test to see if this is already active by checking your phpinfo()
for your current login.


I believe you have to turn OFF anonymous and basic authentication on the
web server to get this to work though. But maybe that'll give you
enough to Google for the rest of the info.

If you're talking about a Windows login on a client machine that's NOT
on the same domain or where the user is logged into the local machine
and not the domain, then I think you're out of luck.

I'm not sure how you'd do it through un*x logins.

Good luck!

-TG

> -----Original Message-----
> From: Ganesh Babu Nallamothu, Integra-India=20
> [mailto:ganeshbabu.nallamothu@integra-india.com]=20
> Sent: Tuesday, November 16, 2004 10:22 AM
>=20
> Hi all,
>=20
> How to find the login name of client machine in php?
>=20
> Regards,
> Ganesh

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com