PHPackages                             savander/twservers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. savander/twservers

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

savander/twservers
==================

Teeworlds Server Info

1.2.1(8y ago)014MITPHPPHP ^7.0

Since Aug 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/savander/TwServersInfo-php)[ Packagist](https://packagist.org/packages/savander/twservers)[ Docs](https://github.com/savander/TwServersInfo-php)[ RSS](/packages/savander-twservers/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (7)Used By (0)

TwServersInfo-php
=================

[](#twserversinfo-php)

PHP Library (+Laravel) - Teeworlds Servers Info This package, allows you to gather information from Teeworlds Servers as well as from TeeWorlds Master Servers.

Requirements
------------

[](#requirements)

- PHP ^7.0

Composer
--------

[](#composer)

Require this package with composer using the following command:

```
composer require savander/twservers

```

To install this package on only development systems, add the `--dev` flag to your composer command:

```
composer require --dev savander/twservers

```

#### for Laravel

[](#for-laravel)

##### Laravel 5.5+

[](#laravel-55)

Laravel 5.5 introduced package autodiscover. It means, that you don't need to aliases and providers to your app by your own.

##### For Laravel 5.4~

[](#for-laravel-54)

After updating composer, add the service provider to the `providers` array in `config/app.php`

```
Savander\TwServers\TwServersServiceProvider::class,
```

Also, add the Facade to the `aliases` array in `config/app.php`

```
'TwServers' => Savander\TwServers\Facades\TwServers::class,
```

Usage (examples based on Laravel Facade)
----------------------------------------

[](#usage-examples-based-on-laravel-facade)

### Teeworlds Servers

[](#teeworlds-servers)

Gathering information from server/servers can consume some time.

You can **add one or few servers** to object by passing `array`

```
$servers = TwServers::addServers([
        new ServerResolver('192.168.0.1', 8303),
        new ServerResolver('192.168.0.2', 8305)
    ]
);
```

or `ServerResolver` class directly to function. (You don't have to pass `port`, by default it is `8303`)

```
$servers = TwServers::addServer(
        new ServerResolver('192.168.0.1')
);
```

To list every server you added, use `getServers()` function

```
  $servers->getServers();
```

It will return list of servers you passed to object, with data from server.

You can automatically get Players from servers by using `getPlayers()` function. You can pass `ServerResolverInterface` object, or string like `ip:port` to get data from already added server.

```
$servers = TwServers::getPlayers(
        new ServerResolver('192.168.0.1')
);

# Array of Player objects
$players = $server->getPlayers();
```

To get specific server from already added, use function `getServer(string $string)`

```
# Index as a combination of ip and port => ip:port or
#                                          ip (only if standard port 8303)
$server = $servers->getServer('192.168.0.1')
```

`ServerResolver` has some function, which you can use, check `ServerResolverInterface`: [**ServerResolverInterface.php**](https://github.com/savander/TwServersInfo-php/blob/master/src/Server/ServerResolverInterface.php)

If server has players, ServerResolver stores PlayerInterface, which has some function as well: [**PlayerInterface**](https://github.com/savander/TwServersInfo-php/blob/master/src/Player/PlayerInterface.php)

### Teeworlds Master Servers

[](#teeworlds-master-servers)

Gathering information from master servers can consume some time.

You can **add one or few servers** to object by passing `array`

```
$servers = TwServers::addMasterServers([
       new MasterServerResolver('master1.teeworlds.com', 8300),
       new MasterServerResolver('master2.teeworlds.com', 8300),
       new MasterServerResolver('master3.teeworlds.com'),
       new MasterServerResolver('master4.teeworlds.com')
    ]
);
```

or `MasterServerResolver` class directly to function. (You don't have to pass `port`, by default it is `8300`)

```
$servers = TwServers::addMasterServer(
        new MasterServerResolver('master2.teeworlds.com')
);
```

To list every server you added, use `getMasterServers()` function

```
  $servers->getMasterServers();
```

It will return list of servers you passed to object, with data from masterserver.

To get specific masterserver from already added, use function `getMasterServer(string $string)`

```
# Index as a combination of ip and port => ip:port or
#                                          ip (only if standard port 8300)
$server = $servers->getMasterServer('master2.teeworlds.com')
```

`MasterServerResolver` has some function, which you can use, check `MasterServerResolverInterface`: [**MasterServerResolverInterface.php**](https://github.com/savander/TwServersInfo-php/blob/master/src/MasterServer/MasterServerResolverInterface.php)

---

**Feel free to add your own version based on those interfaces.**

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

6

Last Release

3221d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b533e24656b7dd01986cb3ed0805dad6c6d97c5092fa308c2e7ad0024cb626e?d=identicon)[Savander](/maintainers/Savander)

---

Top Contributors

[![savander](https://avatars.githubusercontent.com/u/2012010?v=4)](https://github.com/savander "savander (37 commits)")

---

Tags

laravelserverinfoteeworlds

### Embed Badge

![Health badge](/badges/savander-twservers/health.svg)

```
[![Health](https://phpackages.com/badges/savander-twservers/health.svg)](https://phpackages.com/packages/savander-twservers)
```

###  Alternatives

[renoki-co/laravel-healthchecks

Laravel Healthchecks is a simple controller class that helps you build your own healthchecks endpoint without issues.

5754.9k](/packages/renoki-co-laravel-healthchecks)[thiagof/laravelrpc

JsonRPC Client/Server services for Laravel 5

337.5k](/packages/thiagof-laravelrpc)[wrklst/pulse-remote-server

A Laravel Pulse Recorder for Remote Servers

1317.8k](/packages/wrklst-pulse-remote-server)[dniccum/nova-webhooks

A tool for Laravel's Nova administrator panel that enables users to create webhooks that can be customized to fire on specified Eloquent model events (created, updated, etc). This allows applications to communicate with other applications and integrations (Zapier, If This Then That, etc).

188.8k](/packages/dniccum-nova-webhooks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
