Yes, you are wrong.
-Original Message-
From: SolidDigital
To: [EMAIL PROTECTED]
Sent: 2003-12-01 20:10
Subject: Re: [PHP-WIN] Re: How to find out if PC is online
What i meant to say was if gethostbyaddr(ipadress) responds with
something else than the ipadress then this PC must be
Hi,
In fact you're wrong. gethostbyaddr is a DNS query tool. The host does not
need to be up to be referenced in the DNS database.
The dedicated tool to do that is the ICMP socket type ping
>> if the function responds with anything else than the IP adress then the
PC must be online!
Just try:
What i meant to say was if gethostbyaddr(ipadress) responds with
something else than the ipadress then this PC must be online.
Or am I wrong??
Jocjem
B.A.T. Svensson wrote:
And precisly how does the mechnaism with gethostbyaddr(),
e.g. an DNS request, work to be able to resolve the issue
abou
Hi,
Good idea except that gethostbyaddr just query a dns server for a
translation of server name to an ip adress, no matter if the host is "up"
or not.
You've not access to the ping command, you can try to access another
service on your machine ie: http, echo, date ...
For example, using http
And precisly how does the mechnaism with gethostbyaddr(),
e.g. an DNS request, work to be able to resolve the issue
about weather a particular host i online or not?
As far as I know this is not possible. The only thing one might
be able to say after a successfull DNS look up is this-or-that
host