Hello all,
So I have been fighting with this code to ping my minecraft server:
[syntax=php]<?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>";
?>[/syntax]
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: [syntax=text]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 out[/syntax] You 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
Trouble in PHP adventures =/
- killfrog47
- Posts: 106
- Joined: Tue Mar 12, 2013 2:52 am
- Location: Tempe, AZ
- Contact:
-
- Posts: 205
- Joined: Mon Jul 09, 2012 11:13 pm
- killfrog47
- Posts: 106
- Joined: Tue Mar 12, 2013 2:52 am
- Location: Tempe, AZ
- Contact:
Re: Trouble in PHP adventures =/
Yes they are. The code seems to work for others too idk why its not working. I can NOT find code to do such a simple thing! =(
Re: Trouble in PHP adventures =/
What kind of host are you using for the web?
They might be blocking you.
They might be blocking you.
- killfrog47
- Posts: 106
- Joined: Tue Mar 12, 2013 2:52 am
- Location: Tempe, AZ
- Contact:
Re: Trouble in PHP adventures =/
Helx wrote:What kind of host are you using for the web?
They might be blocking you.
I am using a company called arvixe. I opened a ticket with them about it see what they have to say about it
Re: Trouble in PHP adventures =/
they probably have a firewall or something that blocks that port. they should be able to open it for you.
Re: Trouble in PHP adventures =/
Temor wrote:they probably have a firewall or something that blocks that port. they should be able to open it for you.
Well, being a web-host they probably have had troubles with people running MineCraft servers on their systems
If they refuse to open the port, I'd suggest http://x10premium.com. They give so much trust to their users .