Re: Ping
| From: | Brad Hubbard | Date: | Wed, 10 Jan 2001 11:38:52 +0000 |
| Subject: | Re: Ping | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33647@lists.php.net to get a copy of this message | ||
Unfortunately I added some code today to show the local time/date and
haven't tested them since ;)
If the machine being pinged is up it shows a green "Light" if it loses a
ping it'll show red and if it loses 5 in a row it's name goes red and there
should (this is the bit I haven't tested) be a time stamp next to it to show
when contact was lost.
This currently only works on a *nix system (I don't need to run it on M$)
and requires the GD library although
it would be a simple matter to change them to run without GD you also need
sessions with use_cookies enabled (php.ini).
Anyone is welcome to use these BTW, just drop me a line if you do (so I can
feel I'm "making a difference" ;)
Cheers,
Brad
----- Original Message -----
From: "Tshering Norbu" <norbu@druknet.net.bt>
To: <php-general@lists.php.net>
Sent: Wednesday, January 10, 2001 20:03
Subject: [PHP] Ping
Dear list,
I have this proposal: I work in ISP where we have a web site. On our web
site, we would like to ping, say 3 other distant web sites at every interval
of 10 minutes. We would like to have the result like say " The internet is
down" message displayed on our homepage if the PING doesn't get reply. If
there is a reply, then nothing should be displayed. So I would like to know
the PHP functions/code to do that (i.e the PING function). I am sure that
can be done in PHP. Could someone please instruct me how to go about it.
Thanks.
NOBBY