I'm a beginner in PHP and i am working with the steamapi. I got it figured out a bit and wanted to continue importing my current game in my site. Not i had the problem steam doesn't give anything when i use the steamapi and i'm not in game. When i am in game the code works fine (thats what i think thats going on).
To explain me a bit more:
When i am in game: echo $json["response"]["players"][0]["gameextrainfo"];
--> this gives me the name of the game i am now in .
When i'm not in a game and i use: echo $json["response"]["players"][0]["gameextrainfo"];
--> i get this Notice:
Undefined index: gameextrainfo in C:\xampp\htdocs\steam\steamapi.php on line 10
So i think the problem i am having is that when i'm not in a game steam returns nothing?
Can someone help me with this?
Like i said i'm just a beginner in PHP so if this is a dumb question i'm sorry.