SimplePortal

Support => Install and Upgrade => Topic started by: DarkTexas on June 01, 2015, 03:14:35 PM

Title: Need help with a Path
Post 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:

Code: [Select]
include_once 'MinecraftServerStatus/status.class.php';
$status = new MinecraftServerStatus();

Where do I need to put that folder ?

:{

Thanks, dark
Title: Re: Need help with a Path
Post by: ccbtimewiz on June 17, 2015, 01:53:24 AM
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: [Select]
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>';
Title: Re: Need help with a Path
Post by: [SiNaN] on August 01, 2015, 08:51:29 AM
DarkTexas, did the suggestion above work for you? Do you require further assistance with your request?
SimplePortal 2.3.7 © 2008-2021, SimplePortal