Is there any way that I can allow a user to ping a test IP that will go from
User –> Server –> Their Actual Ping Not The Servers
I know you can ping using PHP, but PHP can’t execute anything from the clients side.
jQuery maybe?
Thanks for any tips or suggestions.
JavaScript isn’t capable of performing an ICMP Echo request which is use to ping a server.
The closest alternative is to make an HTTP request using the
XMLHttpRequestorImageobject and measure the time taken; of course, the time taken for that is the combination of DNS lookup, TCP handshake, sending headers, server processing and receiving the response.I should note that after the first “ping” the subsequent requests are probably more accurate.