PHP Countdown Items Remaining Code??

by 6 replies
8
I'm looking for a script that will display a number and drop it down 1 by 1 until its down to 1, for the purpose of simulating the number of available items remaining. It would be more realistic if the number didn't countdown at a consistent interval, but was a bit random.

I've done a lot of searching, but all I could find was countdowns to dates. Does anyone have a script for this that they would be willing to share?

Thanks.
#programming #code #countdown #items #php #remaining
  • Do you want it to count down while the person is looking at the page (ie they see it going down)? If so, javascript may be a better option than PHP.
    • [1] reply
    • Countdown on page refresh? Or countdown without page reload?
      • [1] reply
  • You could use sessions to maintain consistency between page refreshes. It is very simple stuff - you could also use AJAX which would completely avoid people from peeking. However, I do think that's a little paranoid

Next Topics on Trending Feed

  • 8

    I'm looking for a script that will display a number and drop it down 1 by 1 until its down to 1, for the purpose of simulating the number of available items remaining. It would be more realistic if the number didn't countdown at a consistent interval, but was a bit random. I've done a lot of searching, but all I could find was countdowns to dates. Does anyone have a script for this that they would be willing to share?