lill87 Posted September 24, 2007 Share Posted September 24, 2007 Hello, im making an web-based game and im trying to make a code that makes a user to log out automatically if the user is inactive for 30 minutes, but im totally stuck on doing it. And im also trying to make a countdown script. Example: The user is buying an item, the delivery of the item takes 2 minutes. 2 minutes later the user have the item. How do i make that in the MySQL table, and continue ticking even if the user is not logged in? Can someone post an example to my questions, or give a link to websites with similar tutorials or examples. Thanks // lill87 Quote Link to comment https://forums.phpfreaks.com/topic/70515-phpmysql-time-questions/ Share on other sites More sharing options...
roopurt18 Posted September 24, 2007 Share Posted September 24, 2007 Do a google search for "wiki cron" and cron jobs in general. If using a Windows server you'd be using scheduled tasks. Quote Link to comment https://forums.phpfreaks.com/topic/70515-phpmysql-time-questions/#findComment-354203 Share on other sites More sharing options...
lill87 Posted September 24, 2007 Author Share Posted September 24, 2007 I googled it but couldn't find any good examples or tutorials. Do you think you can make me a quick example of one, please? // lill87 Quote Link to comment https://forums.phpfreaks.com/topic/70515-phpmysql-time-questions/#findComment-354211 Share on other sites More sharing options...
cooldude832 Posted September 24, 2007 Share Posted September 24, 2007 first off the timeout script, just set your session life to 30 minuites, and on every reload refresh the session. As for the items, why put a delay in it, just do the proper queries to make the item and then your done, why must u have a delay. If you are making like a shop that restocks then yes a delay makes sense and cron is a good choice, but otherwise no. Quote Link to comment https://forums.phpfreaks.com/topic/70515-phpmysql-time-questions/#findComment-354219 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.