diff options
author | ramon <ramongomez@us.es> | 2017-02-10 13:30:31 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-02-10 13:30:31 +0000 |
commit | 357352b27302b3fef93367cc617647def09b04a0 (patch) | |
tree | 84caa009870e9796f417f7ecba1f069271719728 /admin/WebConsole/principal/sondeo.php | |
parent | f784f182cdda7f91f9e4b35157fe6bf55ba4b5af (diff) |
#708: Obtener datos y código HTTP en llamadas {{{curl_multi}}} de PHP; usar fecha en formato ISO 8601 y quitar líneas en blanco al final de ficheros.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5185 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/principal/sondeo.php')
-rw-r--r-- | admin/WebConsole/principal/sondeo.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/admin/WebConsole/principal/sondeo.php b/admin/WebConsole/principal/sondeo.php index 793ecbd6..27504587 100644 --- a/admin/WebConsole/principal/sondeo.php +++ b/admin/WebConsole/principal/sondeo.php @@ -80,13 +80,13 @@ // Launch concurrent requests. $responses = multiRequest($urls); // Process responses array (IP as array index). - foreach ($responses as $ip => $data) { - if (isset($data)) { - $status = json_decode($data); + foreach ($responses as $ip => $resp)) { + if (isset($resp['data'])) { + $data = json_decode($resp['data']); // If user session is oppened, then append "S" to client status. - if (isset($status->status) and isset($status->loggedin)) { + if (isset($data->status) and isset($data->loggedin)) { // Output format: IP1/Status1;... - echo "$ip/".$status->status.($status->loggedin?"S;":";"); + echo "$ip/".$data->status.($data->loggedin?"S;":";"); } } } |