Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: timed redirect

  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    timed redirect

    I need a redirect that happens between the time of 2a to 6am in php
    can anyone help?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Howdy,

    Probably better ways to do it but I'm short on time...
    PHP Code:
    <?php
        $time 
    date("G");
        if(
    $time>&& $time<7)
            {
                
    header('Location: http://www.freelancepow.com/');
            }
    ?>
    Enjoy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •