current date as gif

Out of context: Reply #15

  • Started
  • Last post
  • 16 Responses
  • CAJTBr0

    hey i wouldn't use the if/then/else method - it just gets way too messy. just set up 3 arrays with numbers as indexes and gif filenames as contents.

    or even simpler if you're wanting to stick with clientside. make a directory full of images like

    day_01.gif
    day_02.gif
    day_03.gif
    ...

    month_01.gif
    ...

    and then have a little function which does the following:

    set three variables (day, month, year)
    sets three new variables consisting of the absolute path of this directory, followed by 'day_' (and the same for month_ and year_) followed the day (and then month and then year) variable followed by '.gif' .

    then document write them out where you want them on the page.

    even more simply, as you seem to suggest that you have php capabilities. in php 3 and later, you can write text to an image. so you could just have a blank gif file, get the date, and write it to this file. there's a tutorial here:

    http://www.thescripts.com/server…

View thread