Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Client Ping via Javascript

Posted on 2008-06-25
5
Medium Priority
?
1,599 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

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.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

609 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