Help Redirecting A Page to Another Page with adverts for 5 seconds, and then redirecting to another page.
Posted
by
XcodeDev
on Stack Overflow
See other posts from Stack Overflow
or by XcodeDev
Published on 2011-01-01T16:41:07Z
Indexed on
2011/01/01
16:53 UTC
Read the original article
Hit count: 192
Hey, I am trying to redirect a page to another page, and that was working successfully. However I am trying to redirect the first page to another page with adverts. This page will then redirect to another page after five seconds.
I am trying to do that by doing this:
<?php
include('ads.php');
?>
<?php
sleep(2);
$url = $_GET['url'];
header("Location: ".$url."");
exit;
?>
However it is showing the advert in ads.php perfectly, but it is not redirecting after five seconds. I am receiving this error in my web browser:
Warning: Cannot modify header information - headers already sent by (output started at /home/nucleusi/public_html/adverts/ads.php:1) in /home/nucleusi/public_html/adverts/index.php on line 7
A typical link I would be redirecting to would be this:
http://nucleusiphone.com/adverts/index.php/?url=http%3A%2F%2Fitunes.apple.com%2Fmx%2Falbum%2Fstill-got-the-blues%2Fid14135178%3Fi%3D14135158
Thanks in advanced.
PS. I don't know any php so any code helps!
© Stack Overflow or respective owner