Usually there is some sort of queue running on the server. This is a constantly running program.
The thing is -- when a php page is loaded through a browser, the PHP parser is run once, and then stopped, pushing all output to the requesting user. You can easily find a place in a queue with PHP, but you can't have a PHP page constantly checking on it's own.
It's possible to have a browser constantly refresh itself (using javascript) to check where it's at in the queue -- but that can be problematic. You will constantly be getting requests to the server application.
I know this isn't really an answer to your post, but I thought i'd offer up some information on your problem.