RsD0p9BK
8/19/2016 - 8:49 AM

ob_start__log.php

// Give user feedback during execution

// start output buffer
if (ob_get_level() == 0) ob_start();
for($i=0;$i<70;$i++) {
    echo ‘printing…<br />’;
    print str_pad(”,4096)."\n";
    
    ob_flush();
    flush();
    usleep(30000);
    // depending on what you are doing, you may or may not need this
    set_time_limit(30); 
}

// http://www.joeyrivera.com/2008/ob_start-ob_flush-flush-set_time_limit-give-user-feedback-during-execution/