Bacanaman Posted June 3, 2017 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 05/28/17 Last Seen: July 20, 2017 Share 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? Link to comment Share on other sites More sharing options...
0 Cyro Posted June 4, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share 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 Link to comment Share on other sites More sharing options...
0 Ninja Posted June 5, 2017 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share 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. Link to comment Share on other sites More sharing options...
0 Bacanaman Posted June 6, 2017 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 05/28/17 Last Seen: July 20, 2017 Author Share 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. Link to comment Share on other sites More sharing options...
0 Ninja Posted June 6, 2017 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share 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 Link to comment Share on other sites More sharing options...
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?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts