$sock = @fsockopen("localhost", $config['server']['statusPort'], $errno, $errstr, 1);
$sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1);
You problem is in config-and-functions.php
changed forPHP:$sock = @fsockopen("localhost", $config['server']['statusPort'], $errno, $errstr, 1);
PHP:$sock = @fsockopen("127.0.0.1", $config['server']['statusPort'], $errno, $errstr, 1);
or post your config-and-functions ,but first try..
It wasent that either my friend helped me
- - - Updated - - -
SOLVED
Yes... It would be nice if you posted the Solution..Then you can post the solution so others can use it also..
$host = 'ChangetoyourIp';
$port = 7171;
$connection = @fsockopen($host, $port);
if (is_resource($connection))
{
echo 'SERVER ONLINE';
fclose($connection);
}
else
{
echo 'SERVER OFFLINE';
}
}
Code:$host = 'ChangetoyourIp'; $port = 7171; $connection = @fsockopen($host, $port); if (is_resource($connection)) { echo 'SERVER ONLINE'; fclose($connection); } else { echo 'SERVER OFFLINE'; } }
If you know a little PHP you can just write your own script ^
It works for me, when everything else doesnt.
U need basic PHP knowledge, but : use sadmans search (google it)
and find inside files: fsockopen
You will see the line number and the file.
then you know where to put code, but u need to remove some part too - remember to make a copy of the file you are using (backup)
u can change the IP to 127.0.0.1, localhost, global ip, whatever works-_
fsockopen is the command... google it, and learn PHP
kk thx Bai.