如果不用php asp等,改用java scritp或vb script有沒有辦法查出client端的IP?
如果不用php asp等,改用java scritp或vb script有沒有辦法查出client端的IP?
這樣嗎?
---------------- Test.vbs ----------------
Dim objWMI, colIP
strComputer = "."
Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colIP = objWMI.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each IP In colIP
If Not IsNull(IP.IPAddress) Then
For i = LBound(IP.IPAddress) To UBound(IP.IPAddress)
MsgBox IP.IPAddress(i), vbInformation, IP.Description(i)
Next
End If
Next
Set objWMI = Nothing
Set colIP = Nothing
書籤