Seeking a Simple Redirect Script Based on the Time of Day

Discussion in 'HTML & Website Design' started by voicetoons, Sep 16, 2011.

  1. #1
    Hi Gang,Hey does anyone know if there is a simple free script / code which allows us to redirect a web site visitor to another page based on the time of day? I've found many for day of week, etc but not by our server time. We are a live character calling service and wish to redirect users to our closed page at the end of our business day as to stop orders from coming in for the day if any.Any help or script is appreciated.VoiceTOONS
     
    Last edited: Sep 16, 2011
    voicetoons, Sep 16, 2011 IP
  2. workingsmart

    workingsmart Well-Known Member

    Messages:
    411
    Likes Received:
    12
    Best Answers:
    9
    Trophy Points:
    120
    #2
    many ways that this can be done... a nice little php / ajax combo or even simply a complete javascript solution can be done...

    Need to know what your current web solution is coded and or if it has a CMS, which one?

    Also need to know, if you're not going to go by server time, then what time variable are you using?...
     
    workingsmart, Sep 16, 2011 IP
  3. voicetoons

    voicetoons Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks for the reply to you both. the webpage is a simple xhtml design, nothing too advanced. we do wish for it to go by our server time which is est at network solutions. just want to send them to another version after hours. if you know of anything already out there, we'd appreciate the reference. not looking to invest money on this as we can live without it. hence the word free in the post. just hoping someone here knows of something.
     
    voicetoons, Sep 16, 2011 IP
  4. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #4
    See your other post - it's trivial script you add to the top of your file. (You'll have to rename it as a .php file if it isn't already.) No AJAX needed, it's all done on the server before the user gets anything.

    BTW, if you want it based on server time, it has to be code running in the server. If you run it in the browser, you're assuming that a) the user's clock is properly set and b) the user's timezone is properly set. Neither assumptions can be relied upon in a world in which most devices with clocks are still blinking 12:00.
     
    Rukbat, Sep 16, 2011 IP