<?php
    $delimiter 
"thirdproject";
    
header('Content-type: multipart/x-mixed-replace;boundary="'.$delimiter.'"');

    
$header = <<<HEAD
Content-type: text/html


HEAD;

    
$boundary = <<<BOUND
--{$delimiter}

BOUND;

    
$footer = <<<FOOT
--{$delimiter}--

FOOT;

    if (
ob_get_level() == 0ob_start();

    
$max 10;
    
mt_srand();
    for (
$i 0$i $max$i++){
        echo (
$i!=0)?$header:$boundary.$header;
        
$content substrmd5mt_rand(0,10) ), 010 );
        echo 
"loop ".($i+1).": $content\n";

        if( 
$i != ($max-1) ){
            echo 
$boundary;
            
ob_flush();
            
flush();
            
sleep(2);
        }
    }

    echo 
"&nbsp;Done.";
    echo 
$footer;

    
ob_end_flush();

?>