• 0

How to detect domain login by using php?


Question

hi all, hope u guys can help me out on this particular problem:

i have several win2k clients running on an AD environment with a win2k server as its domain controller. Each user has their own username and password to enter the domain.

Upon entering the domain, a webpage will be automatically opened and display a customized information for each user.

Okay here's the problem:

Is it possible to detect the username of the client after he enters the domain by using php/javascript?

Do ask if my question is not clear... :blush:

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

is the user account in the HTTP header field AUTH_USER or REMOTE_USER?

Link to comment
Share on other sites

  • 0

I know in ASP, if the users have to log in to enter the site, you can access their logon name via the Request.ServerVariables("LOGON_USER") command.

I can't test it at the moment, but would this work with $HTTP_SERVER_VARS["LOGON_USER"] (ISAPI) or $HTTP_ENV_VARS["LOGON_USER"] (CGI)?

Not sure if this is the right direction, just thought i'd give it to you to look at.

(i used this site and this site to get the info presented here)

Link to comment
Share on other sites

  • 0

nope it didnt work. a user suggest me to look into the w32api extension for php (NetWkstaUserEnum() to be specific) but i never worked on that before...maybe someone can shed some light to me?

Link to comment
Share on other sites

  • 0

okay forget about the API, i opt to use ASP instead to detect the client login, this is my first time using ASP. I've managed to get it running (able to display "HELLO WORLD", yay!). I tried to use this code:

<html>
<body>
<p>
<%	Response.Write(Request.ServerVariables("logon_user"))	%>
</p>
</body>
</html>

but nothing happens..btw im using the normal login (WinXP Pro). Help me? :cry:

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.