The following script produces a pretty weird output: <?php class Net_Portscan { function checkPort($host, $port) { $socket = @fsockopen($host, $port, $errorNumber, $errorString, 30); if (!$socket) { return 0; } return 1; } } echo Net_Portscan::checkPort("127.0.0.1", 80); ?>
The result of the checkPort() call should be either 0 or 1, right? When executing this script on PHP 4.2.0-dev (latest snapshot), Apache 1.3.22 and Linux 2.4.0, the output is a number with 9 digits (e.g. 135197452), that randomly changes with each request. With PHP 4.0.6, Apache 1.3.20 and Debian 2.2r3 it works without a problem. Any hints? - Martin -- Martin Jansen, <[EMAIL PROTECTED]> http://www.martin-jansen.de/ -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]