Seems like i failed a bit with this php code:
<?php $up = fsockopen("localhost", 30810, $errno, $errstr, 30);
if($up)
{
echo '<span style="color: #41AA0E; font-weight: bold;">Online</span>';
}
else
{
echo '<span style="color: #AA0E0E; font-weight: bold;">Offline</span> Server will be back soon!';
} ?>
It shows when the port is used as ONLINE. but when i close the port it shows OFFLINE with this error:
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:30800 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) in C:\wamp\www\login.php on line 2
I was wondering if someone could get it fixed, since i tryed couple of ways to do it and no succes.