<%@ LANGUAGE="VBSCRIPT"%> getmyip ASP + WMI: get an IP Address of the server <% set IPConfigSet = _ GetObject("winmgmts:{impersonationLevel=impersonate}!root\cimv2").ExecQuery _ ("SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE") %> <%If Err <> 0 Then %>

0.0.0.0

<%end if %> <%for each IPConfig in IPConfigSet%> <%if Not IsNull(IPConfig.IPAddress) then %> <%for i=LBound(IPConfig.IPAddress) to UBound(IPConfig.IPAddress)%>

<%=IPConfig.IPAddress(i)%>

<%next%> <%end if%> <%next%> <%If Err <> 0 Then %>

0.0.0.0

<%end if %>