php auto refresh using variable url

Links for php scripts

Moderators: macek, egami, gesf

lsvelu
New php-forum User
New php-forum User
Posts: 1
Joined: Tue Feb 07, 2012 9:52 am

php auto refresh using variable url

Postby lsvelu » Tue Feb 07, 2012 10:30 am

<?php
$path = http://www.mysite.com

header("Refresh: 5; url= $path ");

?>

This script will just after 5 seconds redirect user to page http://www.mysite.com

How to make the script so it does like this
:
1. Refreshes the page after 5 seconds. redirect user to first url say http://www.mysite1.com
2. Refreshes the page again after 5 seconds , but redirect user to new url say http://www.mysite2.com
3. Refreshes the page again after 5 seconds , but redirect user to new url say http://www.mysite3.com

How should the script look like?

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest