0

I would like to create a website to show connection status for anyone who connects to the webserver. This website would be running on my webserver located at 10.1.10.80.

I was thinking to make an index.php file that could have some code in it that would execute a two bash commands: ping 10.1.10.2 if packets are being returned print "connected to local network. ping google.com if packets are being returned show "connected to internet".

I was wondering if anyone could tell me if this is possible to do.

theschoob
  • 3
  • 1
  • 1
  • 2
    Out of curiosity, if they can connect to your web server, would it not be safe to assume that they are indeed, connected to the internet? - Or am I misunderstanding something here? – Epodax Jul 10 '15 at 08:12
  • you may use ajax for this purpose... or http://stackoverflow.com/questions/4607684/curl-and-ping-how-to-check-whether-a-website-is-either-up-or-down – user1844933 Jul 10 '15 at 08:12

0 Answers0