Results 1 to 9 of 9

Thread: header ("Location:", TIME)

  1. #1
    Join Date
    Dec 2007
    Location
    Stranded in Sarasota Florida
    Posts
    75
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Question header ("Location:", TIME)

    I have used a timed header location before. It looks something like this though the code below doesn't work (instant redirect)...

    header ("Location: http://localhost/", 10);
    Using any other method other then header/location is not the answer I'm looking for (such as using refresh, or a different language).

  2. #2
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try this:

    Code:
    $url ="http://localhost"; //here you set the url
    $time_out = 10; //here you set how many seconds to untill refresh
    header("refresh: $time_out; url=$url");
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    JAB Creations (03-18-2008)

  4. #3
    Join Date
    Dec 2007
    Location
    Stranded in Sarasota Florida
    Posts
    75
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Default

    It's not the answer I am seeking though it's close enough...

    Code:
    header("refresh: 5; url=http://localhost/");

  5. #4
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    PHP Code:
    $time=1//seconds to wait
    sleep($time);
    header ("Location: http://localhost/"); 
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  6. #5
    Join Date
    Jan 2008
    Posts
    32
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    PHP Code:
    <head>
    <
    meta http-equiv="REFRESH" content="5; http://localhost" />
    </
    head

  7. #6
    Join Date
    Dec 2007
    Location
    Stranded in Sarasota Florida
    Posts
    75
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Default

    People are not reading my original post which clearly states "Using any other method other then header/location is not the answer" though refresh is close but not the original code I remembered. I would have posted in a clientside forum if I wanted to do this via clientside.

  8. #7
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    my post used header("location: ...");
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@ /\/\@|{
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  9. #8
    Join Date
    Jan 2008
    Posts
    4,167
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    But yours doesn't use the refresh, besides we solved it already.
    Jeremy | jfein.net

  10. #9
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    I don't think we need any more answers. The question has been answered, the end. Master_script_maker, please read the post fully before answering the question.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

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