Results 1 to 2 of 2

Thread: Code for PHP Countdown Timer

  1. #1
    TorresScott is offline Senior Member
    Join Date
    Dec 2009
    Posts
    239
    Rep Power
    3

    Default Code for PHP Countdown Timer

    I am last year MCA student. I am learning PHP programming language. I have done some basic examples of PHP programming language. But I am little bit stuck on Countdown Timer. I am write code for a PHP Countdown Timer. If you are having any solution for that, then please provide that solution to me. It is highly appreciated.

  2. #2
    EvansMitchell is offline Senior Member
    Join Date
    Dec 2009
    Posts
    227
    Rep Power
    3

    Default

    Just have a look at the coding which can make you to understand more properly:

    Code:
    PHP Code:
    <?php
    
     = time();
    
     = mktime(0,0,0,12,25,date("Y"));
    
     =  - ;
    
    
    if ( >= -86400)
    {
       = ;
    }
    
    else
    {
       = mktime(0,0,0,12,25,date("Y")+1);
    }
    
     = round(( - )/86400);
    
    
    if ( > 1)
    {
      echo " days until Christmas";
    }
    
    elseif ((-) <= 0 && (-) >= -86400)
    {
      echo "Today is Christmas!";
    }
    
    else
    {
      echo " day until Christmas";
    }
    
    ?>
    Hope this helps you out with your problem.

Similar Threads

  1. Relay Timer 2.2
    By alexander adam in forum Download Tools and Softwares
    Replies: 0
    Last Post: 08-07-2010, 10:50 AM
  2. First timer questions
    By Michael Buscemi in forum Overclocking
    Replies: 0
    Last Post: 10-09-2009, 12:59 PM
  3. Shutdown Timer 1.00
    By Domenic Smith in forum Download Tools and Softwares
    Replies: 0
    Last Post: 09-11-2009, 10:59 AM
  4. Timer recording
    By Okaf8547 in forum Applications
    Replies: 0
    Last Post: 12-09-2008, 08:16 AM
  5. Countdown to Windows 7
    By techno23 in forum Windows Vista
    Replies: 0
    Last Post: 02-12-2008, 11:36 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48