So I have been fighting with this code to ping my minecraft server:
<?php $multiverseConn = fsockopen('31.205.82.73', '25565', $errno, $errstr, 1); $multiverse = false; if ($multiverseConn) { $multiverse = true; fclose($multiverseConn); } if ($multiverse) { echo "Server is: Online"; } else { echo "Server is: Offline"; } echo "<div>Errno: $errno <br />"; echo "Errstr: $errstr </div>"; ?>It is working for others and not for me. Now i did ask and make sure i have fsockopen access and i do. The server is listening on 25565 what am i doing wrong? I keep gettin this error:
Warning: fsockopen() [function.fsockopen]: unable to connect to 31.205.82.73:25565 (Connection timed out) in /home/tcordero/public_html/index.php on line 36 Server is: Offline Errno: 110 Errstr: Connection timed outYou can see an example at http://tccraft.net in the top right. Also the IP and port for the server are this: 31.205.82.73:25571