¿Se odria hacer que al finalizar imprimiera "Terminado" y se eliminaran las anteriores lineas de "procesando..." ?
Cómo?
Código PHP:
<html>
<head>
<title>Imprimir en tiempo real</title>
<style type="text/css">
p{font-family: verdana,arial; size: 12pt;}
</style>
</head>
<body bgcolor="#f8ffe0">
<?php
ob_start();
@set_time_limit(0);
# (En mi Pc con 233 de RAM se ve el efecto con tan solo 5 digitos)
# Si se quiere que tarde + agregar un digito:
$limite=99999;
$a=1;
$b=substr($limite,0,-1);
$c=$b;
while($a<$limite){
if($a>$b AND $a<$limite){
$salida="\r\n\t<p> ".date('H:i:s');
$b=$b+$c;
if($a<99999998)$salida.=' procesando... - '.ob_get_length();else $salida.='<p>Termine!';
}else $salida=' ';
$a++;
flush();
echo $salida;
ob_flush();
}
$q=ob_list_handlers();
echo '<p><font color="red">>>> '.$salida;
ob_end_flush();
?>
</body>
</html>