PCZONE 討論區

PCZONE 討論區 (https://www.pczone.com.tw/vbb3/)
-   -- 網 路 技 術 版 (https://www.pczone.com.tw/vbb3/forum/29/)
-   -   查詢client端的IP語法 (https://www.pczone.com.tw/vbb3/thread/29/117681/)

alec5106 2005-10-31 04:42 PM

查詢client端的IP語法
 
如果不用php asp等,改用java scritp或vb script有沒有辦法查出client端的IP?

leonchou 2005-10-31 06:19 PM

這樣嗎?

---------------- [COLOR=Blue]Test.vbs[/COLOR] ----------------
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

alec5106 2005-11-01 09:48 PM

多謝,我去試試


所有時間均為 +8。現在的時間是 11:16 AM



 XML   RSS 2.0   RSS 
本站使用 vBulletin 合法版權程式
站務信箱 : [email protected]

本論壇所有文章僅代表留言者個人意見,並不代表本站之立場,討論區以「即時留言」方式運作,故無法完全監察所有即時留言,若您發現文章可能有異議,請 email :[email protected] 處理。