Hi.
I am trying to develop an asp page that will ping a server (say google.com) from my home server, and than save the results to a database. We have been having internet troubles lately, and I want it to automatically ping google every (say 25 minutes) and then record the results to a database.
So far I have:
Code:
<% Response.Buffer = true %>
<%
url = "Google"
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 url & " is " & strStatus
response.write ".<br>" & replace(strPResult,vbCrLf,"<br>")
%>
This will post the results on screen, but I would like these to go to a my connected MS Access database.
Any suggestions
Thanks
Last edited by kw91; 09-01-2006 at 10:54 AM..
|