} /* starting timing of session here */ $time_1 = microtime(true); /* select the required call to the Unifi Controller API based on the action selected */ switch ($action) { case 'list_clients': $selection = 'list online clients'; $data = $unifidata->list_clients(); break; case 'stat_allusers': $selection = 'stat all users'; $data = $unifidata->stat_allusers(); break; case 'stat_auths': $selection = 'stat active authorisations'; $data = $unifidata->stat_auths(); break; case 'list_guests': $selection = 'list guests'; $data = $unifidata->list_guests(); break; case 'stat_hourly_site': $selection = 'hourly site stats'; $data = $unifidata->stat_hourly_site(); break; case 'stat_sysinfo': $selection = 'sysinfo';