|
|
|
Ping an ip address remotely by ASP
3
This VBScript provides the functionality for ping an ip address remotely by an IIS server. This file require IIS to access the ping.exe. see How can a ping an ip address remotely by ASP
<%
url = Trim(Request("ip"))
if url<>"" Then
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("ping " & url)
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
strStatus = "offline"
if InStr(strPResult,"TTL=")>0 then strStatus = "online"
response.write strStatus
End If
%>




There are currently no comments for this snippet.