This is the place where you can find everything related to the dedicated server, control scripts and community tools.
Moderators: Pit Crew, TM-Patrol
-
helliaby
- pedestrian

- Posts: 14
- Joined: 03 Nov 2018 22:13
- Owned TM-games: TMNF
Post
by helliaby » 03 Nov 2018 22:15
-
Xymph
- Pit Crew

- Posts: 5706
- Joined: 19 Aug 2007 12:58
- Owned TM-games: TMN, TMU, TMF, TM²
-
Contact:
Post
by Xymph » 04 Nov 2018 09:20
helliaby wrote: ↑03 Nov 2018 22:15
Is it possible to have the status of my TrackMania server on my website? Only appear Status - Running Play Players 5/50 and such?
Sure:
Code: Select all
#!/usr/bin/php -q
<?php
$ip = '127.0.0.1'; // IP address of server
$port = YourPort; // Port for remote access
$user = 'SuperAdmin'; // Server Login
$pass = 'YourPassword'; // Login Password
require('PathTo/includes/GbxRemote.inc.php');
$client = new IXR_Client_Gbx;
if (!$client->InitWithIp($ip, $port)) {
echo 'Cannot connect - ' . $client->getErrorCode() . ': ' . $client->getErrorMessage() . "\n";
exit;
}
if (!$client->query('Authenticate', $user, $pass)) {
echo 'Cannot authenticate - ' . $client->getErrorCode() . ': ' . $client->getErrorMessage() . "\n";
exit;
}
if (!$client->query('GetStatus')) {
echo 'Cannot get status - ' . $client->getErrorCode() . ': ' . $client->getErrorMessage() . "\n";
exit;
}
$status = $client->getResponse();
print_r($status); // do your own formatting here
// repeat for other methods
?>
-
helliaby
- pedestrian

- Posts: 14
- Joined: 03 Nov 2018 22:13
- Owned TM-games: TMNF
Post
by helliaby » 05 Nov 2018 00:00
Hi, thanks for answering me so fast. But it does not work, I get the error 500
-
Xymph
- Pit Crew

- Posts: 5706
- Joined: 19 Aug 2007 12:58
- Owned TM-games: TMN, TMU, TMF, TM²
-
Contact:
Post
by Xymph » 06 Nov 2018 07:52
helliaby wrote: ↑05 Nov 2018 00:00
Hi, thanks for answering me so fast. But it does not work, I get the error 500
The script is fine, but there could be various reasons (wrong configuration, blocked port, etc.) why it doesn't work in your set-up. It's up to you to debug that.
-
undef.de
- Pit Crew

- Posts: 1340
- Joined: 31 Aug 2009 18:38
- Owned TM-games: TMF, TM2C/S/V, SM
- Manialink(s): undef, tmkarma
- Location: Germany
-
Contact:
Post
by undef.de » 06 Nov 2018 18:28
helliaby wrote: ↑05 Nov 2018 00:00
Hi, thanks for answering me so fast. But it does not work, I get the error 500
This script isn't meant to be used by HTTP, it's a console script.
-
helliaby
- pedestrian

- Posts: 14
- Joined: 03 Nov 2018 22:13
- Owned TM-games: TMNF
Post
by helliaby » 07 Nov 2018 21:46
thanks for your clarification. In this case, for console, how is that? I do not understand, I thought it was accessible from HTTP. What should I do to make it accessible from the page? in this case done through Joomla
-
undef.de
- Pit Crew

- Posts: 1340
- Joined: 31 Aug 2009 18:38
- Owned TM-games: TMF, TM2C/S/V, SM
- Manialink(s): undef, tmkarma
- Location: Germany
-
Contact:
Post
by undef.de » 08 Nov 2018 17:27
helliaby wrote: ↑07 Nov 2018 21:46
In this case, for console, how is that? I do not understand.
XAseco (for example) is a console script too, which also do not run by HTTP. Details about console/cli:
http://php.net/manual/en/features.comma ... uction.php
helliaby wrote: ↑07 Nov 2018 21:46
What should I do to make it accessible from the page? in this case done through Joomla
You have to change the script (which also is just a short example how to do it) to be a plugin for Joomla.
-
helliaby
- pedestrian

- Posts: 14
- Joined: 03 Nov 2018 22:13
- Owned TM-games: TMNF
Post
by helliaby » 11 Nov 2018 21:06
Hi. I found this:
https://github.com/cyco77/gameserver
I have installed it on my website, but it does not work. It is ensured that the ports are not blocked. Will I have to edit something?
-
undef.de
- Pit Crew

- Posts: 1340
- Joined: 31 Aug 2009 18:38
- Owned TM-games: TMF, TM2C/S/V, SM
- Manialink(s): undef, tmkarma
- Location: Germany
-
Contact:
Post
by undef.de » 12 Nov 2018 15:07
That won't work, because it's not for TM (I didn't saw anything about TM there). Maybe the "Website Stats for TMF" which can be found at
http://www.xaseco.org/tools.php could be a thing for you. But that's not a Joomla!-Plugin, it's a stand-alone software.
-
helliaby
- pedestrian

- Posts: 14
- Joined: 03 Nov 2018 22:13
- Owned TM-games: TMNF
Post
by helliaby » 17 Nov 2018 22:59
Thx a lot! It was really what I was looking for