PHP code example of fkrzski / php-steam-api-sdk
1. Go to this page and download the library: Download fkrzski/php-steam-api-sdk 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/ */
fkrzski / php-steam-api-sdk example snippets
use Fkrzski\SteamApiSdk\Http\Requests\ISteamUser\GetPlayerSummariesRequest;
use Fkrzski\SteamApiSdk\SteamConfig;
use Fkrzski\SteamApiSdk\SteamConnector;
use Fkrzski\SteamApiSdk\ValueObjects\SteamId;
$connector = new SteamConnector(new SteamConfig(apiKey: 'YOUR_STEAM_API_KEY'));
$summaries = $connector
->send(new GetPlayerSummariesRequest([SteamId::fromSteamId64('76561198000000000')]))
->dto();
echo $summaries[0]->personaName;