if (isset($a->method) && $a->method == 'close-problem' || strpos($response, "Your session is no longer active.") !== false) { break; } // Drop turns where timestamp is corrupted if (isset($a->params->time) && $a->params->time < $sessionTime->timeStamp) { $badTimes[$a->params->time] = $action; continue; } elseif (isset($a->params) && isset($a->params->time)) { $sessionTime->update_timeStamp($a->params->time); $timeStampAction = $action; } else { // drop turns without timestamps; // this is generally from the server dropping idle sessions continue; } $sessionTime->update_focus($cutoff, $a); // echo " step $ttID<br>\n"; if (isset($a->method) && ($a->method == 'solution-step' || $a->method == 'seek-help')) { $jsonStart = microtime(true); $b = $json->decode($response); $jsonTime2 += microtime(true) - $jsonStart; $thisTurn = NULL; if (isset($b->result)) { foreach ($b->result as $row) { //print_r($row); echo "<br>\n"; if ($row->action == "modify-object" && isset($row->mode)) { $thisTurn = $row->mode; } } } if ($a->method == 'seek-help') {