Code for daily picture?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hypo
    So Fucking Banned
    • Feb 2001
    • 1104

    #1

    Code for daily picture?

    I want to include a self rotating daily picture in my html page code (index.shtml). I will name the pictures according to the dates and upload them on my server, say 051202.gif for 5th December 2002 etc.

    What code do I insert in my html to automatically fetch that day's picture? Some kind of javascript. I cant use php I supposed since the index page extension is not php but shtml?
  • Hot Tropical Babes
    Confirmed User
    • Feb 2001
    • 3014

    #2
    email me [email protected], and i'll help you out
    <BR>
    Trade with Big Tits TGP
    Trade with Titman

    Comment

    • JackFoley
      Confirmed User
      • Jul 2001
      • 858

      #3
      You can create a seperate PHP page and include it on your SHTML page like this:

      [!--#include file="random_img.php"--]

      The PHP file would look like this:

      [?php
      $date = date("dmY");
      echo("[img src='/dailypics/$date.jpg']");
      ?]

      Remember to replace [ and ] with < and >.

      Hope that helps.
      SUBMIT | TRADE | CONTACT

      Comment

      • Big E
        Registered User
        • Mar 2002
        • 935

        #4
        The easiest way is to have a "default" picture (default.jpg) and use a crontab to copy a picture to that filename every night at midnight.

        Comment

        Working...