Can anyone help?
I am trying to run a programme which I want to redirect and then run the rest of the script afterwards.
I am using the following:
header("Location: $redirect");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Connection: close");
for($i = 0; $i < 40000; $i++)
{
echo ' ';
}
flush();
I have the loop in because otherwise the flush doesn't work and it waits until the script finishes (which is too long).
However, if i have the loop in I set a cookie further down which does not work. If I take the loop out the cookie sets but it takes too long!!
Can anyone help, I am stumped 🙁