I am using this url
https://steamcommunity.com/profiles/[STEAMID]/inventory/json/730/2/
then decoding it with json_decode - as it is it works fine, until I refresh my page 2 times, then it gets the error out as it says:
failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests
The cause are too many of your requests in too short a time.
The Steam servers accept 200 request in five minutes or on average one request every 1.5 seconds. You need to do rate limiting by throttling the number of requests you send in order to prevent this error.