"; echo "Token: "; exit; } $json = json_decode($crypt->decrypt(str_replace(' ', '+', $geturl['t'])), true); if($geturl['t'] && $json ){ $json = json_decode($crypt->decrypt(str_replace(' ', '+', $geturl['t'])), true); $objs = [ 'obj_server' => $json['servidor'], 'my_uniqueid' => $json['matricula'], 'obj_queue' => $json['fila'], 'obj_ws' => $json['websocket'], 'supervisor_api' => $json['api'], 'session_uniqueid' => null, 'obj_notification' => null, 'obj_contact' => null, 'obj_status' => null, 'session_window' => null ]; foreach($objs as $key => $val){ $jsStartup[] = "localStorage.removeItem('{$key}')"; if($val){ $jsStartup[] = sprintf("localStorage.setItem('{$key}', '%s')", $val); } } $connected = true; } ?>