I am using ob_ to do some background processing
$buffer = ob_get_contents();
header("Connection: close");
ignore_user_abort(true);
ob_start();
echo $buffer;
$size=ob_get_length();
header("Content-Length: $size");
ob_end_flush();
flush();
ob_end_clean();
file_get_contents($uri.'?loadchanges=1');
the script works fine but I need to refresh the page after
file_get_contents($uri.'?loadchanges=1');
i tried
header( "refresh:0;" );
after or before
echo $buffer;
but it is refreshing twice and I am sure I dont need it there , I need it after the background process is finished.
any help is apreciated