Advertisement
Guest User

Untitled

a guest
May 4th, 2016
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  2. curl_setopt($ch, CURLOPT_HEADER, 0);
  3. $response = curl_exec($ch);
  4. curl_close($ch);
  5. $json = json_decode($response, true);
  6. //-------------------------------------
  7. $invIndexes = [];
  8. foreach($json->rgInventory as $index){
  9. $invIndexes = $index;
  10. }
  11. //-------------------------------------
  12. $makearray = (array)$invIndexes;
  13. for($id = 0;$id < count($invIndexes);$id++){
  14. $index = $makearray[$id];
  15. $item = $json->rgDescriptions[$json->rgInventory[$index]->classid + "_" + $json->rgInventory[$index]->instanceid];
  16. if($item->tradeable != 1){
  17. continue;
  18. }
  19. $ItemName = $item->market_hash_name;
  20. }
  21. var_dump($ItemName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement