Bacanaman Posted June 3, 2017 Posted June 3, 2017 My website is not hosted in the same host as my server and I need to get some info from the server, such as number of online players, whether the WoE is active or not and server status (online/offline). How can I get that info?
0 Cyro Posted June 4, 2017 Posted June 4, 2017 you just need to configure servers.php , instead of localhost/127.0.0.1 use ip assigned to your box/vps
0 Ninja Posted June 5, 2017 Posted June 5, 2017 If changing the IP Addresses doesn't work, you have to make sure that PHP Sockets feature is enabled in your web server and the firewall in your VPS accepts outside queries. $host = 'your rAthena server IP'; $ports = array(6900,6121,5121,3306); foreach ($ports as $port) { $connection = @fsockopen($host, $port); if (is_resource($connection)) { echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n"; fclose($connection); } else { echo '<h2>' . $host . ':' . $port . ' is closed.</h2>' . "\n"; } } if it returns any of the expected response, PHP sockets are enabled. If it retuns that the port is closed then your have to manage your firewall.
0 Bacanaman Posted June 6, 2017 Author Posted June 6, 2017 On 04/06/2017 at 9:34 PM, Ninja said: If changing the IP Addresses doesn't work, you have to make sure that PHP Sockets feature is enabled in your web server and the firewall in your VPS accepts outside queries. $host = 'your rAthena server IP'; $ports = array(6900,6121,5121,3306); foreach ($ports as $port) { $connection = @fsockopen($host, $port); if (is_resource($connection)) { echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n"; fclose($connection); } else { echo '<h2>' . $host . ':' . $port . ' is closed.</h2>' . "\n"; } } if it returns any of the expected response, PHP sockets are enabled. If it retuns that the port is closed then your have to manage your firewall. I use a dedicated server, not a VPS. Thanks for the answer tho, will try using that php script.
0 Ninja Posted June 6, 2017 Posted June 6, 2017 On 6/4/2017 at 1:30 AM, Bacanaman said: My website is not hosted in the same host as my server
Question
Bacanaman
My website is not hosted in the same host as my server and I need to get some info from the server, such as number of online players, whether the WoE is active or not and server status (online/offline). How can I get that info?
4 answers to this question
Recommended Posts