grzesie2k / battleapi
This package is abandoned and no longer maintained.
No replacement package was suggested.
2.0.0
2016-12-20 21:52 UTC
Requires
- php: >=5.4.0
- ext-curl: *
- psr/log: ~1.0.2
Requires (Dev)
- monolog/monolog: ~1.22.0
- phpunit/phpunit: 5.5.*
This package is auto-updated.
Last update: 2020-02-26 10:33:34 UTC
README
Installation
Install the latest version with:
$ composer require grzesie2k/battleapi
Example
###Source Download information about players connected the server:
<?php use BattleAPI\Game\BF4\Server as BF4Server; use BattleAPI\Game\Platform; require 'vendor/autoload.php'; // Configuration $serverId = '27a523ab-9e51-4eaa-9326-c4e6504841f1'; $platform = new Platform(Platform::PC); // Create Battlefield server object $server = new BF4Server($serverId, $platform); // Send query to Battlelog $serverPlayers = $server->getPlayers(); // Print results print_r($serverPlayers);
About
Supported games
- Battlefield 3
- Battlefield 4
- Medal of Honor: Warfighter
Requirements
- BattleAPI works with PHP 5.4 or above and enabled cURL extension.
License
BattleAPI is licensed under the MIT License - see the LICENSE
file for details.