Hi there,
i'm just starting with php.
How can i tell fsockopen() to skip to echo this warnings?
I get all of these warnings and would like to strip them down:
____________________________________________________________________________
____________
Warning: fsockopen(): unable to connect to 192.168.2.209:5800 in
/var/www/htdocs/3.php on line 13
o port 5800 em 192.168.2.210 est� aberto
Warning: fsockopen(): unable to connect to 192.168.2.211:5800 in
/var/www/htdocs/3.php on line 13
____________________________________________________________________________
____________
heres my script:
----------------------------------------------------------------------------
------------------------------------------
<html>
<body>
<?php
$rede="192.168.2.";
$portNumber=5800;
for ($i=209;$i<212;$i++){
$targetIP= $rede . $i;
$a[$i]=_scanport ($targetIP, $portNumber);
//echo $a[$i];
}
function _scanPort ($targetIP, $portNumber) {
$handle = fsockopen($targetIP, $portNumber,
$errno, $errstr, 2);
if ($handle) {
fclose($handle);
echo "o port " . $portNumber . "
em <a href=\"http://". $targetIP .":". $portNumber . "\">". $targetIP .
"</a>". " est� aberto<br/>";
}
return 0;
}
?>
</html>
----------------------------------------------------------------------------
---------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php