status == "ready") { break; } else if ($data->status == "error") { break; } $oldtree = $tree; usleep(1000); } ?>