I need to execute a PHP script without blocking user interface.
Look this (light) example :
<?php
echo "user see this";
header("Location:otherpage.php");
sleep(10);
for($i=1; $i < 100000; $i++){
$t = fopen("test.txt", "a+");
fwrite($t, "$i
");
fclose($t);
}
?>
This example need too much time to been executed, how to make it asynchronous and redirect the user witout interface waiting ???