I have two PHP scripts—we will call them script A and script B. Script A starts running when the user does a certain interaction. Script A needs to run script B in the background—thus return script A's result while script B is still running. I could do this inside script A:
exec('scriptB.php &')
, however since I'm on shared hosting exec
is not allowed. Also, an Ajax solution (initiate both scripts on the client-side) will not work since script B MUST run—I can't have the user maliciously stopping the script from running.
Is there any solution that does not involve using a shell command or Ajax?
Thanks in advance!