PHP code example of ccaglayan / foxhole-php

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

    

ccaglayan / foxhole-php example snippets


use FoxHolePHP\Client;

$client = new Client();
try{
    $client->getWar(); // Get Active War Details
    $client->getMaps(); // Get Active Maps
    $client->getMapReport(MapName) //Get Selected Map War Detail
    $client->getStaticMapData(MapName) // Get Selected Map Static Data
    $client->getDynamicMapData(MapName) // Get Selected Map Dynamic Data
    
}catch(\FoxHolePHP\FoxHoleException $e) {
    echo 'Error:'.$e->getMessage().'--'.$e->getCode();
    exit;
}