Support > Install and Upgrade

Need help with a Path

(1/1)

DarkTexas:
Hi,

I wanted to include that to my portal: https://github.com/FunnyItsElmo/PHP-Minecraft-Server-Status-Query
And, the problem is:


--- Code: ---include_once 'MinecraftServerStatus/status.class.php';
$status = new MinecraftServerStatus();
--- End code ---

Where do I need to put that folder ?

:{

Thanks, dark

ccbtimewiz:
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:


--- Code: ---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>';
--- End code ---

[SiNaN]:
DarkTexas, did the suggestion above work for you? Do you require further assistance with your request?

Navigation

[0] Message Index

Go to full version