Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- $response = curl_exec($ch);
- curl_close($ch);
- $json = json_decode($response, true);
- //-------------------------------------
- $invIndexes = [];
- foreach($json->rgInventory as $index){
- $invIndexes = $index;
- }
- //-------------------------------------
- $makearray = (array)$invIndexes;
- for($id = 0;$id < count($invIndexes);$id++){
- $index = $makearray[$id];
- $item = $json->rgDescriptions[$json->rgInventory[$index]->classid + "_" + $json->rgInventory[$index]->instanceid];
- if($item->tradeable != 1){
- continue;
- }
- $ItemName = $item->market_hash_name;
- }
- var_dump($ItemName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement