Still confused, I understand client-side calling, but how in backend server-side PHP will send the value of 'progress' thru data ? Please give one example of server-side PHP code for sending the value of 'progress'.
In your process (server side) you can write a file with %. For ex:
$totalItems = 1000;
$i=0;
while($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
//YOUR CODE HERE
//ProgressBar -------------------------------------------------------
$i++;
file_put_contents(
'progress.json',
json_encode(array('progress'=>round($i/$totalItems*100,0)))
);
//ProgressBar -------------------------------------------------------
}
Then in other php script you can read the file and return progress as espected on jarry's update function.
hope this help you and excuse my bad english...