Right, i see what you are asking. I don't know a way of directly interogating the windows system through PHP, but in VB it is very easy. My proposal is this: if you have a small VB app which runs automatically at login. When the app autoruns it gets the current login id of the user, it then outputs either a html or PHP page to your desired location (preferably a hidden folder). When your user opens up IE and goes to MySite simply get your PHP script which already pulls the IP to open and read in the login ID from the VB generated file.
You may well have access to VB6 or VB.net, so just in case (I know this is a PHP forum, but this may solve the overall problem.), here is the VB code for the app. Just compile it and add an entry into the autorun section of the registry.
Option Explicit
Private Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function CurrentUser() As String
'******************************************************
' Function to get the current logged on user in windows
'******************************************************
Dim strBuff As String * 255
Dim X As Long
CurrentUser = ""
X = GetUserName(strBuff, Len(strBuff) - 1)
If X > 0 Then
'Look for Null Character, usually included
X = InStr(strBuff, vbNullChar)
'Trim off buffered spaces too
If X > 0 Then
CurrentUser = UCase(Left$(strBuff, X - 1)) 'UCase is optional
Else
CurrentUser = UCase(Left$(strBuff, X))
End If
End If
End Function
Public Function SaveTextToFile(ByVal strData As String,
ByVal FullPath As String,
Optional ByVal ErrInfo As String = "") As Boolean
Dim Contents As String
Dim bAns As Boolean = False
Dim objReader As StreamWriter
Try
objReader = New StreamWriter(FullPath)
objReader.Write(strData)
objReader.Close()
bAns = True
Catch Ex As Exception
ErrInfo = Ex.Message
End Try
Return bAns
End Function
Private Sub Form_Load()
Dim fs As FileStream = New FileStream("C:\YourHiddenFolder\CurUsr.txt", _
FileMode.OpenOrCreate, FileAccess.ReadWrite)
strData=CurrentUser
SaveTextToFile(strData, fs)
Application.Exit()
End Sub
If you prefer to use only PHP, it may help to post the code which is not working for example you said you tried $_ENV['REMOTE_USER'].