I have this bit of code that connects to an ip and returns if its there or not
<?php
$fp = fsockopen ($ip, $port, $errno, $errstr, 5);
if (!$fp)
{
echo "Offline";
} else {
echo "Online";
}
?>
problem is if its not there then it shows all this
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in c:\program files\apache group\apache\htdocs\index.php on line 10
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:21 in c:\program files\apache group\apache\htdocs\index.php on line 10
how can i get it to not show this??
Thanks
Neofox