MineQuery
MineQuery
I've followed all tutorials on this and I'm still getting this error!
37.220.18.188
Status: Online
Slots: /
Players:
Warning: implode() [function.implode]: Invalid arguments passed in /home/dnurtcom/public_html/dom/Server/index.php on line 31
http://evolutionservers.net/Server.zip
37.220.18.188
Status: Online
Slots: /
Players:
Warning: implode() [function.implode]: Invalid arguments passed in /home/dnurtcom/public_html/dom/Server/index.php on line 31
http://evolutionservers.net/Server.zip
Re: MineQuery
Post your code here using
[syntax=php][/syntax] tags.
Re: MineQuery
Index.php
<?php include ('core/init.inc.php'); $info = fetch_server_info($config['server']['ip'], $config['server']['port']); ?> <html> <head> <title><?php echo $config['server']['ip']; ?> Status</title> </head> <body> <div> <h1><?php echo $config['server']['ip']; ?></h1> <?php if ($info = false){ ?> <p> Status: Offline </p> <?php }else{ ?> <p> Status: Online </p> <p> Slots: <?php echo $info['playerCount'];?> / <?php echo $info['maxPlayers'];?> </p> <p> Players: <?php echo implode('', $info['playerList']);?> </p> <?php } ?> </div> </body> </html>error_log
[16-Nov-2012 12:02:30 America/Chicago] PHP Warning: implode() [<a href='function.implode'>function.implode</a>]: Invalid arguments passed in /home/dnurtcom/public_html/dom/Server/index.php on line 31init.inc.php
<?php $path = dirname(__FILE__); include ("{$path}/config.inc.php"); include ("{$path}/inc/mc.inc.php"); ?>config.inc.php
<?php $config['server']['ip'] = '37.220.18.188'; $config['server']['port'] = '25565'; ?>mc.inc.php
<?php // fetches server information from minequery. function fetch_server_info($ip, $port){ $socket = fsockopen($ip, $port, $errno, $errstr, 0.5); if($socket == false){ return false; } fwrite($socket, "QUERY_JSON\n"); $response = stream_get_contents($socket); return json_decode($response, true); } ?>
Re: MineQuery
Do you get the values you were expecting from $info['playerCount'] and $info['maxPlayers'] ?
Re: MineQuery
if you dump the $info variable, do you get bool(false) ?
var_dump($info);
Re: MineQuery
Yes I do, check that link I provided
Re: MineQuery
that means that the function is failing, which means one of these things:
1 You have the wrong IP
2 You have the wrong PORT
3 You don't have access to said IP or PORT
4 The server is down.
Check that everything is correct.
1 You have the wrong IP
2 You have the wrong PORT
3 You don't have access to said IP or PORT
4 The server is down.
Check that everything is correct.
Re: MineQuery
$config['server']['port'] = '25565';25565 is the default port for Minecraft, MineQuery runs on 25566 by default so maybe that is worth a try ?
Re: MineQuery
Is there anything that I need to do server side?
Re: MineQuery
Install MineQuery ? http://dev.bukkit.org/server-mods/minequery/JonnyUK wrote:Is there anything that I need to do server side?