0

How to receive the steam level with steam api.. http://api.steampowered.com/IPlayerService/GetSteamLevel/v1/?key=&steamid=

$link = file_get_contents("https://api.steampowered.com/IPlayerService/GetSteamLevel/v1/?key=".$steamauth['apikey']."&steamids=".$_SESSION['steamid']);
$result = json_decode($link, true);
    $_SESSION['steam_level'] = $result['response']['player_level'];

I tried with the link above but did not go .. or I did something wrong. Please i need help.. if you give me the solution please write it in php.

Vivek
  • 1,465
  • 14
  • 29
DanN
  • 1
  • 1
  • Do you have a valid `key` and `steamid`? Show us the output of `var_dump($result);` – Mr Glass Jun 23 '18 at 20:39
  • Possible duplicate of [How to get steam level and make a check if someone has at least steam level 2](https://stackoverflow.com/questions/51549291/how-to-get-steam-level-and-make-a-check-if-someone-has-at-least-steam-level-2) – Stephen Lake Aug 08 '18 at 14:33

1 Answers1

0

this is the output of var_dump($result)

array(1) { ["response"]=> array(1) { ["player_level"]=> int(34) } }

DanN
  • 1
  • 1