Author Topic: Page rotator help!  (Read 186 times)

rolanduk

  • New Member
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Page rotator help!
« on: August 31, 2010, 05:40:23 PM »
Hy all

I'm here again to ask some help for you.
The question is, how can i make a page, what when someone open, is start rotate a different sites.

For example i have a rotator.php
When somebody visit this
The site will start to show a sites (in the same window), and change every 5 sec.


Like when you write the script you can ad as many site you want

1 www.test1.com  5sec
2 www.test2.com  5sec
3 www.test3.com  5sec
...etc


Please if somebody have some idea help me. Thanks Roland

phphelp

  • Administrator
  • Senior Member
  • *****
  • Posts: 777
  • Karma: +3/-0
    • View Profile
    • PHP Help forum
Re: Page rotator help!
« Reply #1 on: September 01, 2010, 08:18:54 AM »
This is not really PHP tast, because PHP script is executed on server side, sending HTML page to browser. You need to use Javascript. Or you can try meta refresh tag (within the <head> </head>) like this:

Code: [Select]
<meta http-equiv="refresh" content="5;url=http://www.test1.com/">But this will only redirect to the www.test1.com after 5 seconds. To rotate multiple sites, you can refresh the same page (omit url attribute), and use frames - so that every time the page is refreshes after 5 seconds, you load next site to the main frame.
Are you experienced in PHP programming and willing to share your knowledge?
Join us at php help forum!