I am trying processing big data by PHP (100 000 000 records). I am downloading every record from different server, then make some text checkings and probably 10% of appropriate records inserting in my DB (MySQL). My problem is:
web browser just finishes and processing is prematurely interrupted
after every xy checkings I want print in browser count of appropriate records, but nothing is printed
MySQL is not problem. It looks like browser can print something after script is finished, but I want interrupt that script (thread) for short time, print my result by browser and then continue. During processing data browser is "freezed". Any ideas?
example:
for ($i=0; $i<100000000; $i++) {
if (($i % 1000) == 0) { //every 1000th iteration
echo $i; <=== HERE I need interrupt script and let browser print my result
}
}