I\'m trying to do exactly the same thing as in my previous Python question, but in PHP. See my previous (answered) question
PHP script from previous question does someth
You can do it by placing
header('Location: second.php');
at the end of first.php and again at the end of second.php to start executing third.php and so on. Even you can create cycles between two scripts, i.e after ending first.php, second.php will be started and after executing second.php again the first.php, again second.php and so on.
But remember, this is a browser dependent feature and how many script can be executed one after another, totally depends on how many times that browser permits redirection. I found mozilla allows 23 redirections, that means you can executes 23 scripts one after another.
To run a second script on the same server
$appUrl = $_SERVER['HTTP_HOST'];
$path = 'second.php';//your path here
$appUrl = 'http://'.$appUrl.'/'.$path;
file_get_contents($appUrl);
To the best of my knowledge, there isn't any way to run a second page (AJAX is the exception). As far as I know, PHP doesn't support multiple threads (please correct me if I'm wrong) and the 'single-thread' nature of the web seems to defeat it anyways.
I would rather be inclined to look at your specific application and find out why you need to have two separate pages run - and then re-engineer the process so it does not.
I'd be willing to bet that a re-engineer would end being less of a headache from a development standpoint, as well as a logic and implementation one.