-4

I'm Creating a Loading Screen for a game server for Garry's Mod. I need a way to convert the users SteamID or CommunityID to their name. AKA STEAM_0:1:48093934 -> NightmareInfinity or 76561198056453597 -> NightmareInfinity

Im currently using PHP and JavaScript to convert. If you need the function names i have SteamID2Communityid($steamid) and CommunityID2SteamID($communityid) Both functions are in PHP

I have also looked at other questions, None of them helped me.

I looked at the SteamAPI and couldn't find anything.

Stijn Bernards
  • 1,091
  • 11
  • 29
Nightmare
  • 3
  • 2
  • 4

1 Answers1

2

This is an old php function of mine should still work.

function EchoPlayerName($steamid){
    $xml = simplexml_load_file("http://steamcommunity.com/profiles/$steamid/?xml=1");//link to user xml
    if(!empty($xml)) {
        $username = $xml->steamID;
        echo $username;
    }
}
Stijn Bernards
  • 1,091
  • 11
  • 29