Server-Viewer for the own homepage
From TrackmaniaServer Wiki
With a few clicks, you can create your own server viewer for your own homepage. To do so, visit the Admin-Panel and select the tab Bookingoptions. Then click the banner Server-Viewer. Here you can customize the style of the viewer. Thereafter copy the code and copy it to any suitable place to your website sourcecode.
Using a custom stylesheet
Optionally, you can use a custom stylesheet (CSS) to customize the look and feel of your viewer. Some Web-Design knowledge is needed for that. Here is an example of a custom stylesheet:
@charset "utf-8";
/* CSS Document */
.server {
font-family:Arial, Helvetica, sans-serif;
font-size:11px;
color:#000;
margin-top:10px;
border:1px solid #000;
background:#ddd;
text-align:left;
}
.serverdata {
background-color:#eee;
font-size:11px;
padding:4px;
color:#000;
}
.serverdata a{
color:#F60;
font-size:11px;
}
.playerdata {
color:#000;
background-color:#CCC;
font-size:11px;
padding:4px;
}
.tablehead_server {
background-color:#555;
color:#fff;
font-size:12px;
font-weight:bold;
padding:4px;
}
.tablehead_player {
background-color:#555;
color:#eee;
font-size:11px;
padding:4px;
}
Advanced
These parameters may be added to the OPT-Field
- -1 hide column "Logins"
- -2 hide players
Accessing the TrackmaniaServer.org API via a PHP-Script
Visit http://trackmaniaserver.org/integration_documentation to gain more information about that. Note that the hits on the API are being logged and that they are limited if the bandwith usage is too high. We do not offer support on coding own scripts.
Example PHP-Script:
<?php
$USER_ID = XXXXX;
$API_KEY = "YYYYY";
$METHOD = "ZZZZZ";
$ADDLPARAM = "NNNNN"; //Optional
$RESPONSE = json_decode(
file_get_contents('http://trackmaniaserver.org/integration/'.$USER_ID.'/'.$API_KEY.'/'.$METHOD.'/'.$ADDLPARAM)
,true);
?>