Solved

Client Ping via Javascript

Posted on 2008-06-25
5
1,577 Views
Last Modified: 2008-06-30
Hello!

I need some way to ping an IP using javascript.  The ping has to come from the client, hence the JS dependency, and it should work just as if the client ran ping from their command prompt.  The solutions I've found work in the case that the pinged computer is running a web server, but when this is not the case the pingers will fail.  Does anyone know of a solution that should work for this?

Thanks!
0
Comment
Question by:RJBuild
  • 2
5 Comments
 
LVL 11

Expert Comment

by:spoxox
ID: 21869297
Any computer can be set up to refuse ping requests.

If you have a solution that works some times, don't bother trying to make it work for every target.
0
 

Author Comment

by:RJBuild
ID: 21869347
The issue is that the solution I have now works only when the server accepts web requests.  For example, I can ping experts-exchange.com via command line or the script, but if I try some location without a web server, the command line succeeds and the web script fails.

For example, google.com will work in both, but try ns.google.com, which succeeds at the command line, fails on the web page as there is no web server there.
0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 500 total points
ID: 21904506
This can't be done just with Javascript.  If you want something that can work in any browser then look at making or finding an applet.  For example a Java applet.  If just an IE solution is sufficient then you could look at an ActiveX object.  The browser itself can't use clientside script to do this, especially based on the client.

Browser security does limit even applets and objects but they can do more if the user is willing to allow them to be downloaded or run.  Most of the times this is a one time warning.  A signed applet or object will be able to do more so you might have to have yours signed if you develop it yourself.

I don't know of a premade applet that will do this, which I could trust.  A google search will offer a number of results.  I'll be happy to try to help you find one if I can but I would recommend making your own, especially if this is something you will distribute to users/visitors and want them to trust.

Let me know if you have question or need more info.

bol
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 21904578
I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now