dimanche 18 janvier 2015

Using php(?) to increase number value every server day by random amount

Looking for breadcrumbs/hints on a project I've found in my lap. I typically work in pure HTML/CSS with sprinkles of basic PHP/Javascript. Usually if someone sends me in the right direction I can piece things together.


My client wants a ticker that updates every SERVER DAY. For Example:

1. Value X is set to 100

2. check if 24 hours (SERVER time, not client time) has passed

3. Run number generator between 5-10. Store in value Y

4. Update value X to X+Y. Re-store as value X

5. Return to step 2


I have searched this problem a couple different places but haven't quite found the direction I'm looking for. This question was close: javascript, increase number day by day


and led me to believe PHP might be my language of choice...but I'm finding more information geared towards this question written in javascript and stored client-side in cookies, which wasn't really what we were going for.


Does anyone have any ideas to get me started in the right direction? Doesn't seem to hard logically, just need to figure out the semantics. Any help is super appreciated....





Aucun commentaire:

Enregistrer un commentaire