Re: [PHP] Checking if a host is online
From: David T-G (davidtg-php_at_justpickone.org)
Date: 11/29/03
- Next message: Chris Shiflett: "EOR (Was: [PHP] DAMN)"
- Previous message: Galen: "Suggestions for optimization?"
- In reply to: Jason Giangrande: "Checking if a host is online"
- Next in thread: Jason Giangrande: "Re: [PHP] Checking if a host is online"
- Reply: Jason Giangrande: "Re: [PHP] Checking if a host is online"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Nov 2003 12:32:44 -0500 To: PHP General list <php-general@lists.php.net>
Jason --
...and then Jason Giangrande said...
%
% I'm creating an application for an Intranet that, among other things, is
% supposed to check to see if particular hosts are online, and if so, what
% their IP address is. Anyone know how I can accomplish this? I tried
...
% a while to execute for even a few hosts at once.
1) If you're first checking to see if it's alive and second checking for
its IP address you are, IMHO, doing it backwards :-)
2) It sounds like you're rewriting BigBrother. Check out bb4.com for
info. It absolutely rocks and I wouldn't run a real site[1] without it.
3) At the very least, cut your ping timeout down to the smallest
acceptable; in general, a full second is plenty of time to get nearly
anywhere on your continent (ain't it great? :-) and so your intranet
should be more than happy with that allowance.
4) I know that BB has already beaten this problem, so you should also
check there, but there may be a way to ping numerous hosts at once
(netping or such). Try some googling. If nothing else, I know that you
could whip up a perl script which will fork the load and then run them in
parallel and could return the live/dead/notfound results; I don't think
that php has forking.
[1] My house must therefore by definition not be a real site, but it
aspires to be -- and shall whenever I can find some unallocated time :-)
HTH & HAND
:-D
-- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
- application/pgp-signature attachment: stored
- Next message: Chris Shiflett: "EOR (Was: [PHP] DAMN)"
- Previous message: Galen: "Suggestions for optimization?"
- In reply to: Jason Giangrande: "Checking if a host is online"
- Next in thread: Jason Giangrande: "Re: [PHP] Checking if a host is online"
- Reply: Jason Giangrande: "Re: [PHP] Checking if a host is online"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|