Re: Re[2]: [PHP-WIN] Ping!
| From: | Jason Brooke | Date: | Fri, 06 Oct 2000 02:30:22 +0000 |
| Subject: | Re: Re[2]: [PHP-WIN] Ping! | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2978@lists.php.net to get a copy of this message | ||
It's probably putting something like "Resource id #1" into $s, so is
being found true each time in your check. The manual says fsockopen
returns int, so I'm not sure why "Resource id #1" comes back.
You might check for an int value of the return value instead, as a
workaround.
jason
> $host="udp://192.168.220.108";
> $port=139;
> $s=fsockopen($host,$port);
> if (!$s) {
> echo "Not here";
> } else {
> echo "I'm here";
> }
> fclose($s);
>
> Any ideas?
>
> Gonzalo.