- ignore_user_abort: documentation ( source)
- ob_end_flush: documentation ( source)
- ob_get_length: documentation ( source)
- ob_end_clean: documentation ( source)
- sleep: documentation ( source)
- header: documentation ( source)
<?php
ob_end_clean();
header("Connection: close");
ignore_user_abort(); // optional ob_start();
echo ('Text the user will see');
$size = ob_get_length();
header("Content-Length: $size");
ob_end_flush(); // Strange behaviour, will not work flush(); // Unless both are called !
// Do processing here
sleep(30);echo('Text user will never see');?>