fork(2) download
  1. <?php
  2.  
  3. $json = '{
  4. "ISteamClient": 0,
  5. "ISteamFriends": 0,
  6. "ISteamUser": 0,
  7. "IEconItems_440": 0,
  8. "IEconItems_730": 0,
  9. "ISteamGameCoordinator_440": 0,
  10. "ISteamGameCoordinator_570": 0
  11. }';
  12. $json_str = json_decode($json, true);
  13. $clientesteam = $json_str["ISteamClient"];
  14. echo "O Cliente Steam esta " . ($clientesteam == 0 ? "Online" : "Offline");
  15.  
  16. $json = '{
  17. "ISteamClient": 1,
  18. "ISteamFriends": 0,
  19. "ISteamUser": 0,
  20. "IEconItems_440": 0,
  21. "IEconItems_730": 0,
  22. "ISteamGameCoordinator_440": 0,
  23. "ISteamGameCoordinator_570": 0
  24. }';
  25. $json_str = json_decode($json, true);
  26. $clientesteam = $json_str["ISteamClient"];
  27. echo "\nO Cliente Steam esta " . ($clientesteam == 0 ? "Online" : "Offline");
  28.  
Success #stdin #stdout 0.01s 24448KB
stdin
Standard input is empty
stdout
O Cliente Steam esta Online
O Cliente Steam esta Offline