Thread: Timing

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    23
    Rep Power
    0
    Anyone here know how to use the "if" according to the user's time?
    For example, when it's between 5a.m. and 7p.m. show a specific HTML page, else show another.
    If this is impossible just respond saying this is impossible

    ------------------
    C.K.C.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    yes ,

    It is possible.

    see this eg:

    <?php

    $time=date("h a");
    // curent hour and am or pm

    if ($time=="5 a.m"){
    //redirect here
    }elseif ($time=="6 a.m"){

    }elseif ($time=="7 a.m"){

    }...

    ?>

    that's it!!


    ?>


    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    23
    Rep Power
    0
    Why is it when I change my computer's time and refresh the document, it still appears the same?? Is it because this script is FoolProof???

    Please Respond

    ------------------
    C.K.C.
  6. #4
  7. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Actually i given an example for server side timing.


    Why is it when I change my computer's time and refresh the document, it still appears the same?? Is it because this script is FoolProof???


    For getting client's current time,you need to write a java script program and redirect the user to a new page....

    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited June 07, 2000).]
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    23
    Rep Power
    0
    I know the javascript way, but since there is no way to do it in PHP, I have no choice...the point is that I do not want people looking at the code used to do it!!

    ------------------
    C.K.C.

Similar Threads

  1. Apache timing out, but still running okay (?)
    By cka in forum Apache Development
    Replies: 1
    Last Post: October 28th, 2003, 06:53 PM
  2. DHTML not displaying from server (timing issue?)
    By dasantillo in forum JavaScript Development
    Replies: 2
    Last Post: October 2nd, 2003, 03:29 AM
  3. Timing sorts..
    By movEAX_444 in forum C Programming
    Replies: 1
    Last Post: September 30th, 2003, 09:39 PM
  4. Apache slow access / timing out
    By cvillepats in forum Apache Development
    Replies: 0
    Last Post: August 25th, 2003, 03:35 PM
  5. djbdns timing out
    By bjseiler in forum DNS
    Replies: 3
    Last Post: May 12th, 2003, 08:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo