@fsockopen

Status
Not open for further replies.

zurfaria

New Member
Messages
2
Reaction score
0
Points
1
Hey guys, so I've been working on some code to test if a server (Minecraft) is online or not. Code:

<?php

$ip = 'zurfaria.fmc.pw';
$port = 25565;

$checkSock = @fsockopen($ip, $port, $empty, $empty, 1);

if($checkSock !== FALSE)
{
echo 'Online';
}else{
echo 'Offline';
}

?>​

I troubleshooted this code when I found out it didn't work, and I was told that I needed to have sockets open. Is there any way I could do that (free plan)?
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
As far as I'm aware, on free hosting outcoming connections of ports such as what you're using would get blocked.
 
Status
Not open for further replies.
Top