Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. if (isset($_SESSION['steamid'])) {
  3. $url = "http://steamcommunity.com/profiles/" . $_SESSION['steamid'] . "/inventory/json/730/2";
  4. $json_object= file_get_contents($url);
  5. $json_decoded = json_decode($json_object);
  6.  
  7. $arrayIndex = 0;
  8.  
  9. foreach($json_decoded['rgDescriptions'] as $entry) {
  10. $market_name = $entry['market_name'];
  11.  
  12. $inventoryItemNames = array($arrayIndex => $market_name);
  13. $arrayIndex += 1;
  14. echo $market_name . "<br>";
  15. }
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement