Updating a PHP text-based game continuously
<p>I'm building a multiplayer game in PHP. Each game is split into stages that last a set amount of time - currently 2 minutes. In each stage, players work together for a set amount of time until the game either advances to the next stage, or the stage (and hence the game) is lost, and a new game starts again.</p>

<p>I have a vision of playing the game on an HTML page, where users can see how much time is left in the current stage through a constantly updating countdown clock.  When the countdown clock reaches zero, the game either advances or ends, and the result is returned through Ajax. What I'm having problems with is the (theoretical) thought of 100 players playing the game simultaneously.</p>

<p>How do I call the update script? If I call it by running PHP, which player's browser calls it? If a player's browser refreshes the content one second before the stage actually finishes, what happens?</p>

<p>Is PHP the right language for a game like this?</p>
