PHP code example of vinevax / steam-php-api

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

    

vinevax / steam-php-api example snippets


use VineVax\SteamPHPApi\SteamClient;

$steam = new SteamClient('YOUR_API_KEY');

$steam->getNewsForApp(appId: 440, count: 3, maxlength: 300);

$steam->getGlobalAchievementPercentagesForApp(appId: 440);

$steam->getPlayerSummaries(steamIds: 76561197960435530);
$steam->getPlayerSummaries(steamIds: [76561197960435530, 76561197960435531]);

$steam->getFriendList(steamId: 76561197960435530, relationship: 'friend');

$steam->getPlayerAchievements(steamId: 76561197960435530, appId: 440, language: \VineVax\SteamPHPApi\Enums\Language::ENGLISH);

$steam->getPlayerStatsForGame(steamId: 76561197960435530, appId: 440, language: \VineVax\SteamPHPApi\Enums\Language::ENGLISH);

$steam->getOwnedGames(steamId: 76561197960435530, 

$steam->getRecentlyPlayedGames(steamId: 76561197960435530, count: 15);
bash
composer