I want to run more than 300 PHP script simultaneously in background. I tried using exec() one after another. But it runs sequentially. It means first it executes exec() first command then next exec() command. How can I run all PHP script in background at a time ? Current code :
exec("wget -O - http://mywebsite.com/index.php >/dev/null 2>&1");
exec("wget -O - http://mywebsite.com/index3.php >/dev/null 2>&1");
exec("wget -O - http://mywebsite.com/index4.php >/dev/null 2>&1");
exec("wget -O - http://mywebsite.com/index5.php >/dev/null 2>&1");
This script first executes index.php entirely and then executes index3,4,5. But I want to run all at a time. Any help would be appreciated.
Thank you!
Regards, John