How to call other scripts without header method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    How to call other scripts without header method

    I would like to know how I can automatically call other scripts if I
    have to first display a message. The reason is I would like to
    display a message for about 30 seconds then automatically call another
    script but if I do this with header() I get an error.
    Another question I have is, Is there a PHP method equivalent to
    setInterval() in JavaScript?

    Thank you
    John
  • Alvaro G Vicario

    #2
    Re: How to call other scripts without header method

    *** John wrote/escribió (23 Mar 2004 08:42:30 -0800):[color=blue]
    > Another question I have is, Is there a PHP method equivalent to
    > setInterval() in JavaScript?[/color]

    Hmmm... sleep() maybe?


    --
    --
    -- Álvaro G. Vicario - Burgos, Spain
    --

    Comment

    • Henk Burgstra

      #3
      Re: How to call other scripts without header method

      On Tue, 23 Mar 2004 08:42:30 -0800, John wrote:
      [color=blue]
      > I would like to know how I can automatically call other scripts if I
      > have to first display a message. The reason is I would like to
      > display a message for about 30 seconds then automatically call another
      > script but if I do this with header() I get an error.[/color]

      You could use this to display a message and redirect after 30 seconds:

      <html>
      <head>
      <META HTTP-EQUIV="REFRESH" CONTENT="30;URL =http://your.redirect.u rl">
      </head>
      <body>
      Your message here
      </body>
      </html>

      Regards,
      Henk Burgstra

      Comment

      • Henk Burgstra

        #4
        Re: How to call other scripts without header method

        >[color=blue]
        > The HTTP-EQUIV means you're trying to fake an HTTP header. PHP gives
        > you the advantage of issuing a proper HTTP refresh header. I've never
        > done it, but this may work:
        >
        > header("Refresh : 30; URL=http://example.com/");
        >
        > From the quick bit of Googling I've done, I read that some browsers
        > may not support this header, but it is still more reliable than a META
        > refresh. Also, the redirect address should be included as part of your
        > message.[/color]

        Sure, but the op asked for a solution *without* using the header method
        because that caused an error.

        Regards,
        Henk Burgstra

        Comment

        Working...