1. Go to this page and download the library: Download samiaraboglu/pubg-php-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
samiaraboglu / pubg-php-api example snippets
$config = new Pubg\Config();
$config->setApiKey('{API_KEY}');
$config->setPlatform('{PLATFORM}');
$api = new Pubg\Api($config);
$playerService = new Pubg\Player($api);
// by player name
$player = $playerService->get('{PLAYER_NAME}');
// by account id
$player = $playerService->get('{ACCOUNT_ID}');
// by players names
$players = $playerService->getAll(['{PLAYER_NAME_1}', '{PLAYER_NAME_2}']);
// by accounts ids
$players = $playerService->getAll(['{ACCOUNT_ID_1}', '{ACCOUNT_ID_2}']);