Author |
Message |
Acaria Board Member
Joined: 20 Feb 2009
Posts: 238
|
Posted: Wed Nov 04, 2009 10:21 pm Post subject: Only allow after 24 hours? |
|
|
Okay, so I want to make a game for my users that will deal out daily prizes. That'll be simple.
The only thing I'm having issues with is the 24 hour part. I literally have no idea where to start. ._.
Anyone know what I need to do? |
|
Back to top |
|
|
Ptirhiik Board Member
Joined: 19 Nov 2008
Posts: 114
|
Posted: Thu Nov 05, 2009 3:43 am Post subject: Re: Only allow after 24 hours? |
|
|
Assuming the time is static (eg not depending a user event) : you can call a php through CRON (if your provider allows it), or use your computer (or any other) to hit this php page once a day (using ie the window scheduler). You can also rely on having at least one visit a day (google ie ), and execute your day treatment during this visit if not already done. |
|
Back to top |
|
|
Acaria Board Member
Joined: 20 Feb 2009
Posts: 238
|
Posted: Thu Nov 05, 2009 6:12 pm Post subject: Re: Only allow after 24 hours? |
|
|
It does depend of the user, though. What I want is for them to go to a page and get a random prize. Once they go to that page, though, they must wait exactly 24 hours before they can claim the prize again. |
|
Back to top |
|
|
Ptirhiik Board Member
Joined: 19 Nov 2008
Posts: 114
|
Posted: Fri Nov 06, 2009 3:07 am Post subject: Re: Only allow after 24 hours? |
|
|
So just store the last time the user claims his prize on the users table, adding a field, using time() to get the time. |
|
Back to top |
|
|
|