Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts

    PHP Count Down Timer

    I need a timer that will count down 10:00mins minutes and preform an event at 0:00mins and then restart back to 10:00mins and begin counting down again. This script must continue even when there are no users online. Does anyone know of a script, or point me in the right direction of how I can make this myself.

  • #2
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    You're looking for a cron job, you'll want to make it activate every 10 minutes. You'll want it to make a timestamp of the current time + 10 minutes, and write that somewhere then call it and see how many seconds until that timestamp and that'll be the countdown. For a live countdown you'll need Javascript.

  • #3
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts
    People do not need to see the timer, it just needs to be happening in the background 24/7... I do not need javascript for that do i?

  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    no javascript runs purely on a clients machine. Therefore when there are no users, there is no counter.
    PHP and cron would be my best bet also

    -Adam
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •