Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    I had a little play around with image gd..

    PHP Code:
    <?php
    $christmas 
    mktime(0,0,0,12,25,date("Y")) + 3600// Finds the timestamp for Christmas at midnight of the current year (Hours,Minutes,Seconds,Months,Days,Year), date("Y") finds the current year

    $time $christmas time(); //Finds seconds between Christmas at midnight and the time now.

    if($time <0) {print("Merry Christmas");} // Prevents errors if it is beyond midnight

    else { // Adds an exception

    $times $time 60// Finds the number of seconds as a result of finding the remainder of dividing by 60
    $time floor($time 60); // Effectively removes those seconds from the total by dividing by 60 and then flooring

    $timem $time 60// Finds the number of minutes as a result of finding the remainder of dividing by 60
    $time floor($time 60); // Effectively removes those minutes from the total by dividing by 60 and then flooring

    $timeh $time 24// Finds the number of hours as a result of finding the remainder of dividing by 24
    $time floor($time 24); // The number of hours is the floored value of dividing the number of hours by 24

    $text $time." Days, ".$timeh." Hours, ".$timem." Minutes, ".$times." Seconds.";
    //print($text);
    }
    // The End

    // Create a blank image and add some text
    $im imagecreatetruecolor(21020);
    $text_color imagecolorallocate($im2331491);
    imagestring($im155,  $text$text_color);

    // Output the image
    //imagegd($im);
    header('Content-Type: image/png');
    imagepng($im);

    // Free up memory
    imagedestroy($im);
    ?>
    Chippiewill.


  2. #12
    Join Date
    Sep 2010
    Location
    Derbyshire
    Posts
    3,442
    Tokens
    683
    Habbo
    Zuth

    Latest Awards:

    Default

    [@]@Chippiewill[/@] when will the competition end since its now day 14? :S

    RIP Grandad - Click here to see my Dads Subaru Impreza WRX STI in action!


  3. #13
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    I was just giving it breathing room, but considering all the entries.. I guess I win? Nah I kid, you win! What colour would you desireth?
    Chippiewill.


  4. #14
    Join Date
    Sep 2010
    Location
    Derbyshire
    Posts
    3,442
    Tokens
    683
    Habbo
    Zuth

    Latest Awards:

    Default

    Quote Originally Posted by Chippiewill View Post
    I was just giving it breathing room, but considering all the entries.. I guess I win? Nah I kid, you win! What colour would you desireth?
    Yay! Can I get the Christmas one please!

    RIP Grandad - Click here to see my Dads Subaru Impreza WRX STI in action!


Page 2 of 2 FirstFirst 12

Posting Permissions

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