PHP code example of lifeformwp / php-pubg

1. Go to this page and download the library: Download lifeformwp/php-pubg 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/ */

    

lifeformwp / php-pubg example snippets


$client = new GuzzleHttp\Client();
$class = new \Lifeformwp\PHPPUBG\PUBGManager($client, 'token');

$data = $class->getMatch('pc-eu', 'abe08f7e-3add-4fd6-9bcd-4aff88fc7adf'); //returns array
$matchObject = $class->hydrate($data, \Lifeformwp\PHPPUBG\PUBGManager::HYDRATE_MATCH); //returns Lifeformwp\PHPPUBG\DTO\Match object