Getting value back from fsockopen?

From: Date: Thu, 27 Jun 2002 11:43:56 +0000
Subject: Getting value back from fsockopen?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-104135@lists.php.net to get a copy of this message
Currently I am using fsockopen on my IP and a port and when sending a UDP request it always says it's open. Now, what I'm trying to do is see if I have an application running on there. This application listens to the port I'm trying to hit. Is there a way with fsockopen I can do this? Instead of hitting and saying open all the time I can return some value? The listening application in a compiled exe, not a PHP or any kind of application I can add code to send information with... Code I am using currently: <? $fp = fsockopen("udp://IP", 5121, $errno, $errstr); if (!$fp) { echo "ERROR: $errno - $errstr<br>\n"; } else { echo("Server up!"); echo("<BR>Handle: ".$fp); } ?> Jeff

« previous php.general (#104135) next »