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
If a user will be using a web browser to reach the php script, I would use ajax to call the second page.
The user won't even know it is being called.
See w3schools for a tutorial on AJAX