
May 5th, 2000, 03:23 PM
|
|
Registered User
|
|
Join Date: Apr 2000
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I'm using Windows NT (yeah, I know.. :^) and I want to be able to check if another NT PC (not a server) is up before I exec a command to it. Any ideas? I already tried doing:
<CODE>
if (!($ip = fsockopen(gethostbyname("this-pc"), 7, &$errno, &$errstr, 2 ))) {
echo "Can't get throughn";
} else {
echo "Socket opened!n";
fclose($ip);
}
</CODE>
To try and open a socket to the ECHO service (i.e., the ping port?) but that always fails.
|