Is there anyway to ping a web domain from another location in command line ?
I found some websites who provide this kind of services but was wondering if I can do this from terminal.
Thank you.
search online ping site; for example i found helloacm
i wrote this:
#!/bin/bash
echo -e $(curl -s https://helloacm.com/api/ping/?host=${1:-"yahoo.com"})
run and output is:
/tmp$ ./siteping anubis.ir
"PING anubis.ir (5.56.133.10) 56(84) bytes of data.
64 bytes from host4.azaronline.com (5.56.133.10): icmp_seq=1 ttl=54 time=14.9 ms
64 bytes from host4.azaronline.com (5.56.133.10): icmp_seq=2 ttl=54 time=14.8 ms
64 bytes from host4.azaronline.com (5.56.133.10): icmp_seq=3 ttl=54 time=14.8 ms
--- anubis.ir ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min\/avg\/max\/mdev = 14.849\/14.888\/14.951\/0.109 ms
"
OR you can write mini php script and upload it on your site..
then run it with curl
from terminal
If the domain's server firewall allows it you can use
ping www.domain.com
Of course it's only an example, the top level domain doesn't have to be '.com' If ICMP is not allowed, you'll get timeouts.