Guys, im just a newbie here, i have a school project and its a web-based project that scans all Internet Protocol (IP) in a Local Area Network (LAN) and displays a green light image if the workstation is online and red light image if offline, this is my coding:[code=asp]
<% Response.Buffer = true %>
<%
url = "192.168.0. 1"
Set objWShell = CreateObject("W Script.Shell")
Set objCmd = objWShell.Exec( "ping " & url)
strPResult = objCmd.StdOut.R eadall()
set objCmd = nothing: Set objWShell = nothing
strStatus = "offline"
if InStr(strPResul t,"TTL=")>0 then strStatus = "online"
response.write url & " is " & strStatus
%>[/code]
if the ip is offline then the output here is:
192.168.0.1 is offline
my question is... if there's any code that changes the value of 'strStatus' into image that is located in 'Images\offline .gif' ? Btw, im using ASP VBScript.
Thanks in advance guys.
<% Response.Buffer = true %>
<%
url = "192.168.0. 1"
Set objWShell = CreateObject("W Script.Shell")
Set objCmd = objWShell.Exec( "ping " & url)
strPResult = objCmd.StdOut.R eadall()
set objCmd = nothing: Set objWShell = nothing
strStatus = "offline"
if InStr(strPResul t,"TTL=")>0 then strStatus = "online"
response.write url & " is " & strStatus
%>[/code]
if the ip is offline then the output here is:
192.168.0.1 is offline
my question is... if there's any code that changes the value of 'strStatus' into image that is located in 'Images\offline .gif' ? Btw, im using ASP VBScript.
Thanks in advance guys.
Comment