Mar 9, 2003 #1 Michael42 Programmer Oct 8, 2001 1,454 US How can I ping an IP number or DNS from ASP and return the results of whether it was sucessful or not? Thanks for your time!
How can I ping an IP number or DNS from ASP and return the results of whether it was sucessful or not? Thanks for your time!
Mar 9, 2003 #2 khazmir Programmer May 29, 2001 41 US Trying using a component such as AspPing (http://www.serverobjects.com/products.htm#aspping)or DSPing Pro (http://www.donia.com/products.htm#DSPing). Upvote 0 Downvote
Trying using a component such as AspPing (http://www.serverobjects.com/products.htm#aspping)or DSPing Pro (http://www.donia.com/products.htm#DSPing).
Mar 9, 2003 Thread starter #3 Michael42 Programmer Oct 8, 2001 1,454 US These components look realy good. Thanks. I may end up opting for them. Is there anyway you can "detect" if a web page is available using native ASP? Thanks again! Upvote 0 Downvote
These components look realy good. Thanks. I may end up opting for them. Is there anyway you can "detect" if a web page is available using native ASP? Thanks again!
Mar 9, 2003 #4 khazmir Programmer May 29, 2001 41 US Here's a script I got from ASPFAQ.com: <% Response.Buffer = true %> <% url = "http://www.espn.com" 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>" %> There are also scripts for XP and .NET on this page, http://www.aspfaq.com/show.asp?id=2033. Hope this helps! Upvote 0 Downvote
Here's a script I got from ASPFAQ.com: <% Response.Buffer = true %> <% url = "http://www.espn.com" 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>" %> There are also scripts for XP and .NET on this page, http://www.aspfaq.com/show.asp?id=2033. Hope this helps!