> > > You are right ping is the best way to know if the machine is 
> > > connected to the network. Search for ICMP on cpan
> >
> > Assuming ping is not disabled on that machine and/or 
> network and you 
> > have 100% control over if it ever is or not, sure. But pinging a 
> > machine at your home throught your isp? How will you 
> know/control what 
> > the isp sets up for ping or anything.
> >
> > But if you're testing to see if the machine is live so as 
> to say give 
> > them
> a link to visit your local machine's web site then why not do 
> a http request to find out so you can tell them that you are 
> connected so they should do an http request over to you?
> >
> > So for a network you control ping is good but in this case 
> who knows.
> >
> > Hve Fun
> >
> > Dan
> 
> what if the box is up, the webserver is down ?? as long as 
> ICMP can reach, you are still piped in. BTW ISDN is a dial-up.

The subject is "check if webserver is online", so I am assuming he 
wants a status on the web site of if his webserver is available or not.

So it depends on what he wants. To check if the webserver is online and can 
except http request, IE visitors can go viit his site onthat box,
like the subject seems to say, the two script/LWP way 
will be 100% accurate everytime.

To check if his box is connected to the interent then ping will be good as long
 as the box is pingable and not disabled along the way somewhere. 
So it will be partly accurate
Since : 
        if there is a ping reply then it's online and pingable.
        if there is not ping reply it could be:
                - not online
                - online but unpingable
So basically we're talking methods not Perl
Since it is an issue with ping and not perl. The ping issue would take effect 
if you were just doing it via caommand line.

So with Ping and Perl also look at Net::Ping.

HTH
Dan

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to