Jump to content


Photo

Global Time


  • Please log in to reply
3 replies to this topic

#1 tubs2222

tubs2222
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 14 March 2006 - 05:04 PM

Hey guys,

I've been faced with a problem on my site with a little count down script:

[a href=\"http://nationwar.awardspace.com/code.txt\" target=\"_blank\"]Code[/a]

btw i'm making a lottery game

When the $ml is equal to zero the person can bid again, the code works and everytime, but the time resets only if the user views the page. For example if the user bids then comes baq the next day it will tell them if they won or not eventhough the bidding duration is only 180 secs. But i'm trying to make the counter go on even though the user does not access the page

I hope i'm not being confusing, if i am please ask me any question regarding the program.

Thank you

#2 keeB

keeB
  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 14 March 2006 - 09:33 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] But i'm trying to make the counter go on even though the user does not access the page [/quote]

Store their last accessed time in a database.. and the time at which they can vote again, and every time they access the 'Bid' page, get their data and make sure 180 seconds haven't passed..

You basically have the general idea in the code, you just need to store it for later retrieval.

Come visit my site to see my latest projects
http://nick.stinemates.org/wordpress/


#3 tubs2222

tubs2222
  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 14 March 2006 - 10:58 PM

[!--quoteo(post=355066:date=Mar 14 2006, 04:33 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 14 2006, 04:33 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Store their last accessed time in a database.. and the time at which they can vote again, and every time they access the 'Bid' page, get their data and make sure 180 seconds haven't passed..

You basically have the general idea in the code, you just need to store it for later retrieval.
[/quote]

Yes, I have already done that.

I'll try to explain it better, ok for example lets take this case as an example. The countdown starts when you have placed a bet, this is the 1st round. You can not place a bet for another 180 secs. But the problem is that the person will visit the page again in another 1000 secs. Even though they came backk after 1000 secs the round finishes and the second round begins.

What i'm trying to do is if the person doesn't come baq after 180 secs the 2nd round being then the 3rd then the 4h and so on even thought the user is not present.

#4 keeB

keeB
  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 14 March 2006 - 11:09 PM

You're not making much sense

Come visit my site to see my latest projects
http://nick.stinemates.org/wordpress/





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users