koraktorのSteamCondenserを使用すると、この情報を簡単に取得して使用できます。
require_once('steam/db.php');
$_STEAMAPI = "YOURAPIKEYHERE"; // You get this from http://steamcommunity.com/dev/apikey
$playersStr = ""; // This is a comma separated list of profile IDs
// if you don't have those, Steam Condenser has functions to acquire it
$players = array(); // For this example, I'm building an array of players assuming you'll have multiple players returned.
// You are free to skip this if you are only pulling one back
$url = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=$_STEAMAPI&steamids=$playersStr";
$json_object= file_get_contents($url);
$json_decoded = json_decode($json_object);
foreach ($json_decoded->response->players as $player)
{
$players[$player->steamid]['personaname'] = $player->personaname; // In game name
$players[$player->steamid]['profileurl'] = $player->profileurl; // URL to their Steam Community Page
$players[$player->steamid]['avatar'] = $player->avatar; // Small Avatar Icon URL
$players[$player->steamid]['avatarmedium'] = $player->avatarmedium; // Thumbnail avatar URL
$players[$player->steamid]['avatarfull'] = $player->avatarfull; // Full sized Avatar URL
}
プレイヤーのプロファイルIDを持っていないが、Steam IDを持っている場合は、次のようにプロファイルIDを取得できます。
$profile_id = SteamId::convertSteamIdToCommunityId($steam_id);