How to Open a new webpage in new window after 10 seconds in php?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kris N

    How to Open a new webpage in new window after 10 seconds in php?

    How to Open a new webpage in new window after 10 seconds in php?

    It is like if i am browsing http://xyz.com , then after 10 seconds a new window open with the url http://abc.com

    Any idea?
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    I use this in one of my scripts
    Code:
    $refreshtime = 600; #10 minutes
    $header = 'refresh: '.$refreshtime.'; url=http://www./path/to/page.php';
    header($header);
    Can't remember how it works

    Comment

    • Kris N

      #3
      How should basically we have to implement this code?

      Comment

      • code green
        Recognized Expert Top Contributor
        • Mar 2007
        • 1726

        #4
        What problem are you having with it?

        Comment

        • Kris N

          #5
          It will open the new page in the same window , i belieive.
          But i want the new page to be open in new window.

          Comment

          • code green
            Recognized Expert Top Contributor
            • Mar 2007
            • 1726

            #6
            Modufy the address here
            Code:
            url=http://www./path/to/page.php
            To any address you like

            Comment

            • hsriat
              Recognized Expert Top Contributor
              • Jan 2008
              • 1653

              #7
              It will need JavaScript implementation.
              Use window.onload, window.setTimeo ut and window.open functions.

              Comment

              Working...