Download the PHP package savander/twservers without Composer

On this page you can find all versions of the php package savander/twservers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twservers

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

Composer

Require this package with composer using the following command:

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

for Laravel

Laravel 5.5+

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~

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

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

Usage (examples based on Laravel Facade)

Teeworlds Servers

Gathering information from server/servers can consume some time.

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

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

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

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.

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

ServerResolver has some function, which you can use, check ServerResolverInterface: ServerResolverInterface.php

If server has players, ServerResolver stores PlayerInterface, which has some function as well: PlayerInterface

Teeworlds Master Servers

Gathering information from master servers can consume some time.

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

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

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

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)

MasterServerResolver has some function, which you can use, check MasterServerResolverInterface: MasterServerResolverInterface.php


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


All versions of twservers with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package savander/twservers contains the following files

Loading the files please wait ....