Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3950718
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:38:42+00:00 2026-05-20T01:38:42+00:00

I want to run a JavaScript code to ping 4 different IP addresses and

  • 0

I want to run a JavaScript code to ping 4 different IP addresses and then retrieve the packet loss and latency of these ping requests and display them on the page.

How do I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:38:43+00:00Added an answer on May 20, 2026 at 1:38 am

    You can’t do this from JS. What you could do is this:

     client --AJAX-- yourserver --ICMP ping-- targetservers
    

    Make an AJAX request to your server, which will then ping the target servers for you, and return the result in the AJAX result.

    Possible caveats:

    • this tells you whether the target servers are pingable from your server, not from the user’s client
      • so the client won’t be able to test hosts its LAN
      • but you shouldn’t let the host check hosts on the server’s internal network, if any exist
      • some hosts may block traffic from certain hosts and not others
    • you need to limit the ping count per machine:
      • to avoid the AJAX request from timing out
      • some site operators can get very upset when you keep pinging their sites all the time
    • resources
      • long-running HTTP requests could run into maximum connection limit of your server, check how high it is
      • many users trying to ping at once might generate suspicious-looking traffic (all ICMP and nothing else)
    • concurrency – you may wish to pool/cache the up/down status for a few seconds at least, so that multiple clients wishing to ping the same target won’t launch a flood of pings
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some jQuery/JavaScript code that I want to run only when there is
I have a standard HTML input that I want to run JavaScript code when
I have a problem with the following javascript code. Basically I want to run
I want to run javascript/Python/Ruby inside my application. I have an application that creates
I am submitting a ColdFusion Form and I want to run some JavaScript to
I want to run a shell command in Terminal, then clear the console, from
I want to write a user script that runs some custom JavaScript code on
I'm working a web page where I'd like to run some JavaScript code when
I am looking into Javascript programming without a browser. I want to run scripts
I have some javascript code that is used in a few different pages in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.