SimplePortal
Support => Install and Upgrade => Topic started by: DarkTexas on June 01, 2015, 03:14:35 PM
-
Hi,
I wanted to include that to my portal: https://github.com/FunnyItsElmo/PHP-Minecraft-Server-Status-Query
And, the problem is:
include_once 'MinecraftServerStatus/status.class.php';
$status = new MinecraftServerStatus();
Where do I need to put that folder ?
:{
Thanks, dark
-
You can put it on the same directory that SMF is on.
Example;
./index.php
./Sources
./Themes
./MinecraftServerStatus
And in the PHP block, you can put this:
include_once('MinecraftServerStatus/status.class.php');
$status = new MinecraftServerStatus();
$response = $status->getStatus('pvp24.com');
if ($response)
echo '
<img width="64" height="64" src="' . $response['favicon'] . '" /> <br />
The server ' . $response['hostname'] . ' is running on ' . $response['version'] . ' and is online.<br />
Number of players: ' . $response['players'] . '/' . $response['maxplayers'] . '<br />
MOTD: ' . $response['motd'] . '<br />
Ping:' . $response['ping'] . ' milliseconds';
else
echo '
<span style="color: red;">The server is currently <strong>offline</strong></span>';
-
DarkTexas, did the suggestion above work for you? Do you require further assistance with your request?