API Documentation

Alright, alright. Stop asking! Here's your API :P

Getting Started

You will need your server's IP and port which you can find on our home page.

The format of the URL is https://scumservers.net/api.php?ip={SERVER_IP}&port={PORT}

You will need to replace the {SERVER_IP} and {PORT} with your own.

For example: https://scumservers.net/api.php?ip=172.106.131.141&port=28900

Usage

Now, assuming you're using PHP, use the following code:

  // Fetch your server information.
  // NOTE: Don't forget to use your servers IP and port.
  $data = file_get_contents("https://scumservers.net/api.php?ip=172.106.131.141&port=28900");

  // Decode the JSON response to an array.
  $arr = json_decode($data, true);

  // The following data is available and can be accessed like so:
  $serverName = $arr['serverName'];
  $serverTime = $arr['serverTime'];
  $queryPort = $arr['queryPort'];
  $gamePort = $arr['gamePort'];
  $maxPlayers = $arr['maxPlayers'];
  $players = $arr['players'];
  $passwordProtected = $arr['password'];
  $ipAddress = $arr['ipAddress'];
  $version = $arr['version'];
  $countryCode = $arr['countryCode'];
  $countryName = $arr['countryName'];
      

Hope it helps. Reach out if you need help :)

Return to home page