To simplify the process of interacting with Dixrix API, we provide a PHP SDK that allows you to easily integrate your game server management into your website.
You can download the PHP SDK from the following link:
The PHP SDK provides two main methods:
Retrieving the List of Games
This method allows you to fetch the list of games available on Dixrix, along with their corresponding aliases.
// Example of retrieving games
$api = new \dixrix\API('your_api_key');
$games = $api->GetGames();
Adding Servers
You can add your servers to the platform using this method. Up to 100 servers can be added in a single request.
// Example of adding a server
$api = new \dixrix\API('your_api_key');
$api->AddServerToList('csgo', '127.0.0.1', 27015);
$response = $api->SubmitServers();
Here’s an example of how you can use the SDK to retrieve games and add a server:
require_once 'path_to_sdk/API.php';
$api = new \dixrix\API('your_api_key');
// Retrieving the list of games
$games = $api->GetGames();
print_r($games);
// Adding a server to the list
$api->AddServerToList('csgo', '127.0.0.1', 27015);
$api->AddServerToList('cs2', '127.0.0.2', 27016, 27023);
$api->AddServerToList('minecraft', '129.1.1.1', 25565, 25567);
$response = $api->SubmitServers();
print_r($response);