user name on windows 2000

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

user name on windows 2000

Post by pelegk2 »

how do i get the user name that the user have logged with on windopws 2000?
iknow it possible to retriview it with asp with server variables!
how can i do it in php?
thnaks in advance
peleg
dave420
Forum Contributor
Posts: 106
Joined: Tue Feb 17, 2004 8:03 am

Post by dave420 »

The username of the remote person? I do this on our corporate network using http://www.sysinternals.com 's psloggedon, part of the pstools suite. The suite is cool, as it can tell you lots of info about the remote computer (and I mean LOTS). It's 100% command-line-based, so it fits into PHP really well.

To get the remote user, I just run "psloggedon -l \\".$_SERVER["REMOTE_ADDR"] and grep the output.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

ok i will check it thanks alot:)
Post Reply