anyway you can think of how to do this in PHP? This is my current loop, excuse the messiness of the code.
do
{
if(!isset($mergedArrays))
{
$mergedArrays = array();
$mergedArrays = json_decode(runAPI_Command($ip,$domainsid,$domain,$actions,$currentPosition),true);
$totalObjects = $mergedArrays["total"];
$currentPosition = $mergedArrays["to"];
}
else
{
$output = json_decode(runAPI_Command($ip,$domainsid,$domain,$actions,$currentPosition),true);
$currentPosition = $output["to"];
$mergedArrays = array_merge($output["objects"],$output["to"],$output["from"],$output["total"]);
}
$currentPosition = $mergedArrays["to"];
$size = sizeof($mergedArrays["objects"]);
echo "<br>Total Objects:$totalObjects <br>";
echo "Current Position:$currentPosition<br>";
echo "Size of Array:$size";
} while ($currentPosition < $totalObjects);