Jump to content

mekodak

New Members
  • Posts

    2
  • Joined

  • Last visited

mekodak's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I got moste of it: if($_REQUEST['name']) { foreach(json_decode($json_code, true) as $k=>$user_id) { if($user_id['name'] == $_REQUEST['name']) { if($user_id['online'] == '1') { echo TRUE; } else if($user_id['online'] == '0') { echo FALSE; } } } } But have problems requesting for the mac I dont know if it is the arrey that is annoying me.
  2. How to get a state return on a request? Like: http://domain.com/example.php?name=Bob Return: 'true' or like: http://domain.com/example.php?name=Alex Return: 'false' Based on the online state from this JSON: 127.0.0.1 - 2022-10-01 13:13:20 - INFO - [ { "config_group_id":2, "device_count":2, "devices":[ "11:22:00:00:00:01", "11:22:00:00:00:02" ], "name":"Bob", "pause":false, "profile_id":2, "timespent":{ "has_quota":false, "quota":0, "total_spent":{ "normal":91, "reward":0 } }, "online_device_count":1, "online":true }, { "config_group_id":3, "device_count":2, "devices":[ "11:22:00:00:00:03", "11:22:00:00:00:04" ], "name":"Alex", "pause":false, "profile_id":3, "timespent":{ "has_quota":false, "quota":0, "total_spent":{ "normal":0, "reward":0 } }, "online_device_count":0, "online":false }, { "config_group_id":9, "device_count":3, "devices":[ "11:22:00:00:00:05", "11:22:00:00:00:06", "11:22:00:00:00:07" ], "name":"$lan$", "pause":false, "profile_id":4, "timespent":{ "has_quota":false, "quota":0, "total_spent":{ "normal":638, "reward":0 } }, "online_device_count":2, "online":true } ]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.