rotating every 100 page refresh

Discussion in 'Programming' started by exinrex, Apr 3, 2008.

  1. #1
    Hey Guys,

    Need some help. Any idea how to rotate text every 100 page refresh or every 1 hour the text will rotate. Thank's in advance.
     
    exinrex, Apr 3, 2008 IP
  2. awatson

    awatson Active Member

    Messages:
    112
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    It's probably easier to set it up to change every hour. You could just set up a database or whatever with 24 sets of text. When a visitor hits the page, use PHP to check the time and then take the record from the database that corresponds to the hour of the day, i.e. at 3pm take the 15th record (15 hours on the 24 clock).
     
    awatson, Apr 3, 2008 IP
  3. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    #3
    Or you could set a a session and +1 on every page load, and then when the session is equal to 100 display a different link
     
    crazyryan, Apr 3, 2008 IP
  4. exinrex

    exinrex Active Member

    Messages:
    413
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #4
    thank's to your reply. but i dont use database only text for record. Anyway thank's to your idea i will try to make it with php.
     
    exinrex, Apr 3, 2008 IP
  5. exinrex

    exinrex Active Member

    Messages:
    413
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #5
    Is the session also calculate other user? example user1 open the site so it viewed 1 and other computer or user2 open the site is it viewed 2 or back to 1? sorry I'm not a programmer.thank's
     
    exinrex, Apr 3, 2008 IP