Re: [PHP] Checking if a host is online

From: David T-G (davidtg-php_at_justpickone.org)
Date: 11/29/03


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!




Relevant Pages

  • RE: Same IIS Problem...different day...please help
    ... After you assigned "Intranet" as the host header of this new site. ... add a new DNS record or add a static record in the SBS server's HOSTS ... SBS server) because HOSTS file only works locally. ... DNS record as SharePoint's Companyweb: ...
    (microsoft.public.inetserver.iis)
  • Re: iptables trick to limit number of connections on a router
    ... Eric Tao a écrit: ... certain intranet IP to an internet ip, if for a specific intranet ip the ... I suggested fair bandwidth sharing among hosts, ...
    (comp.os.linux.networking)
  • Can you have multiple website on IIS6 to use one global.asa
    ... have decided to split various sections of the intranet to seperate ... My question is we now have all these hosts running off the same IIS6 ...
    (microsoft.public.inetserver.asp.general)
  • URL resolution
    ... On our Windows network, I have a server that hosts our Intranet whose ... I can not rename the server. ...
    (microsoft.public.windows.server.networking)