I have a front that will trigger an script to run on background, while that script is running I want to redirect my user for another page. But the way that it's right now, the browser keeps loading until my script is done, and than it redirects for my success page. That script has many HTTP requests, and if the browser hang until the execution is done, It will throw a timeout.
My question is, how can I use a browser for trigger a script on background and redirect my user for a success page right away?
shell_exec("/usr/bin/php /path/to/script/script.php {$_arg1} {$_arg2} {$_arg3}");
header("Location: success.php");