jeg her fundet det her engang, hvor man kalder ping, så kan man vel også kalde en bat fil.
<%
strIP = "
www.abc.dk"Function ipAdresse(strIP)
Set net = Server.CreateObject("wscript.network")
Set sh = Server.CreateObject("wscript.shell")
sh.run "%comspec% /c ping " & strIP & " > " & server.mappath( strIP & ".txt"),0,true
Set sh = nothing
Set fso = createobject("scripting.filesystemobject")
Set ts = fso.opentextfile(server.mappath( strIP & ".txt"))
ipAdresse = null
Do While Not ts.AtEndOfStream
data = trim(ts.readline)
If instr(data,"Ping-statistikker for ") Then
myArr = split(data,"Ping-statistikker for ")
ipAdresse = myArr(1)
Exit Do
End If
loop
ts.close
Set ts = nothing
'fso.deletefile server.mappath( strIP & ".txt") 'Used to delete the temp file
Set fso = nothing
ipAdresse = trim(split(ipAdresse,":")(0))
End Function
response.write(ipAdresse(strIP))
%>