You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the users on the whitelist can be done like this:
require_once'vendor/autoload.php'; // Load Composer's autoloaderuseNitrapi\Nitrapi;
$nitrapi = newNitrapi('your_api_key', 'your_api_secret');
// Define the server ID for the game server you want to retrieve the whitelist for$serverId = 'your_server_id';
try {
// Get the whitelist for the specified server$whitelist = $nitrapi->gameservers->getServerWhitelist($serverId);
// Print the whitelist entriesforeach ($whitelistas$entry) {
echo"Player: " . $entry->getUsername() . "\n";
}
} catch (Exception$e) {
echo"Error: " . $e->getMessage();
}
can anybody help me?
I am trying to view the tags in the list using php. I don't know how to use the API.
The text was updated successfully, but these errors were encountered: