Jump to content

PHP & real-time effects


apw

Recommended Posts

Hi

 

Probably depends on how close to real time you want it to be.

 

Using regular CRON jobs you could come up with something close to it, along with careful design so that when anything is affected it updates its fields.

 

However I don't believe php supports firing off threads.

 

All the best

 

Keith

apw,

 

Out of curiosity, why would you not store the dates in a DB and then use php to alter them?  If you keep datetimes in a DB, you'd be able to have countdown timers for when something completes 

 

Keep in mind that you're going to need a whole host of different variables based on the user.  With many users, comes an exponential growth in variables.  Keeping them in a database I think would benefit you, and then you could simply use JS as a timer, grabbing the starting and end times from the DB.

 

Hope this helps.

Hi

 

For things like that just use Javascript to count down (it is merely there for display to the user). If you want you can reload the page using Javascript when the timer reaches 0 (and then do required table updates from the php script you call to do the update).

 

All the best

 

Keith

Geudrik, i wasnt aware that i was able to store simple times such as 40 seconds or 1minute-30 in a database but i do se what your saying about stamping the time then adding an end-time of x-min/sec to this which would work also im just not sure about the js countdown being fed the times through my database yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.