Play-Servers API - Your game server info & Stats

Play-Servers API

With Play-Servers API, you will be able to display game server statistics and player info on your website using JSON or JS

Supported games




JSON API
Available options: players, maxplayers, gameid, game, gamename, connectlink, ip, port, status, mapname, version, recordplayers, hostname, votes, ping, location_code, info_updated


ID - Your Server ID


Maps API (Beta)
Available options: mapname, big_image, small_image, description



GAMEID - GameID, MAPNAME


Votes API (Beta)
Returns:
success (Player voted & first query, if you get this result - you can give a reward to player)
already (Player voted & query already used before)
error (Can't find vote info for this server and this player name / ip)



SERVERID - Your Server ID, PLAYER - Player IP / Nickname used in vote

If you need to use Nicknames, you need to send a Array request (Need: votifer = 1, nickname = Player Name) from your website/plugin form to server page on Play-Servers




JS API (Legacy):
1. First you need to place to (< head>) tag this code:

server_id - your server id on Play-Servers (play-servers.com/server-id)

2. Now you can use special options with information needed

Available options:
ip - Adress without port
port - Server port
status - Server status (1 - online | 0 - offline)
hostname - Server name
gamemode - Server gamemode param
players - Players online
maxplayers - Maximum players on server
record - Players record
lastconnect - Last connect time
version - Server version
votes - Server votes

How to use this: (Show this information on your website)

Example (Change server id and paste this code on your website page):



You see this:
Server: Game Default Server Name
IP: 12.34.567.89:28015
Version: 1.0
Online: 52 / 500
Players record: 153
Information updated: 01.05.2021 12:00
Status: Online
Votes: 413

Random Project

GFLClan Servers 192
Games For Life is a multi-game community, includes our own Counter Strike: Global Offensive, Team Fortress 2, Rust, and Garry's Mod...