1. Go to this page and download the library: Download nullx27/esi-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/ */
nullx27 / esi-php example snippets
Instance = new nullx27\ESI\Api\AllianceApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$datasource = "tranquility"; // string | The server name you would like data from
$userAgent = "userAgent_example"; // string | Client identifier, takes precedence over headers
$xUserAgent = "xUserAgent_example"; // string | Client identifier, takes precedence over User-Agent
try {
$result = $apiInstance->getAlliances($datasource, $userAgent, $xUserAgent);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AllianceApi->getAlliances: ', $e->getMessage(), PHP_EOL;
}