Outputting exec() ping result progressively
问题 I'm trying to write a function that pings a few hundred addresses and returns their values (milliseconds). So far I've achieved the initial idea which is to ping and get the result but the problem arises when using the same code for hundreds of addresses, the PHP page stalls until it either times out or reaches the last ping command. I would be glad if I could get some suggestions to output the results progressively, here is my current code: <?php // "for" loop added according to suggestion