I there I have a problem with this tutorial :
http://www.youtube.com/watch?v=NssQ9u9M ... re=related
I'd like to know why do I get a bool(false) when this is my real IP adress (I also get an error, see HERE)
I downloaded the plugin minequery and I installed it (on my own server. you can get the IP HERE)
Could you make me a little .zip file and put all we need for making this works ?
Thanks !
P.S: I share my server by a port forwarding if that can help.
Minecraft status
Re: Minecraft status
you should post all your code here so that we can take a look at it.
Re: Minecraft status
No.gotgot1995 wrote:Could you make me a little .zip file and put all we need for making this works ?
-
- Posts: 3
- Joined: Tue Dec 06, 2011 9:16 am
Re: Minecraft status
here is the status.php :
<?php include('core/init.inc.php'); ?> <?php var_dump(server_online($servers[0][0])); ?>the init.inc.php
<?php $servers = array(array('90.49.136.43', '25565')); include("lib/minecraft_server.inc.php"); ?>and here is the minecraft_server.inc.php
<?php //vérifie si le serveur est en ligne function server_online($server, $port){ fsockopen($server, $port, $errno, $errstr, 0.5); return ($errno === 0); } ?>I'd like to not get the error "connexion timed out" I'd like to get a "Server OFFLINE" message.
-
- Posts: 3
- Joined: Tue Dec 06, 2011 9:16 am
Re: Minecraft status
and when my server is really online, I get a bool false ! Why ? I need to put something special on my server ?
Re: Minecraft status
Because the connection to the server is failing. It looks like you are giving the wrong port since you are not passing the second parameter on this linegotgot1995 wrote:and when my server is really online, I get a bool false ! Why ? I need to put something special on my server ?
var_dump(server_online($servers[0][0]));It should be
var_dump(server_online($servers[0][0], $servers[0][1]));