I'm brainstorming a php game, and need the user to be notified immediately if they are attacked. I'd like a pop up box saying "You have just been attacked! Retaliate or take cover??" Then show the two buttons for the choices. How would I go about incorporating this into a mainly php script.
Much appreciated.
Pop up message for notification
Moderator: General Moderators
Re: Pop up message for notification
keep on refreshing the player's PHP web page accessing a "data" stored on the server that tells if it is being attacked or not... or use javascript's XMLHTTP request to avoid full page refreshing.