can you countdown time in PHP

Croatia (Hrvatska)
May 23, 2008 5:00pm CST
this is question for php programmers ... im also trying to be the one of them and stuck on this thing like some online games have option that after you do some task like go fighting, after that you need to wait 5 minutes until you will be able to do fight again, or you can build tanks and soldiers and need to wait a 5 minute for everyone to be produced... how to sort this out, can it be done in just php with those php timestamp or there is something more to learn, please help
1 response
23 May 08
Yeah you can do that sort of thing in php as a function, same as most programming languages. For effect it would depend what the game was written in. If it was written in flash for example, it'd be easier to just code it straight into the actionscript rather than outsource bits of the functions to php or any other language. If it's a web-based game like an MMORPG then it'd be like disallowing anymore actions until stamina had returned, or until an hour had passed and new action pts were available.
• Croatia (Hrvatska)
23 May 08
yes, i would like it to be like mmorpg written in php, and i would like it to do like you say, its looking a realy good to do it like that but just the problem is that i doesnt know how, do you know any point of tutorial for this, thanks