Here is a piece of code i just wrote for my own use, however this could be helpful for any of you with php scripts.
DO you run a membership site, or even operate a squeeze page?
Make The Most Out Of Your Opt-In And Activation Pages.
You are generating traffic to these pages, why not make good use of them.
This code will allow a timed redirect during your confirmation or activation pages.
On your thank you page for confirming their email address or on the optin check confirmation pages, you can have a timed redirect on php pages.
Now how you put that to use is to have a processing header.
ie ... Please wait while we add you to our list.
Set this to 15 seconds, and while they are waiting post some type of advertisment. Whether you want them to click on a link or just to inform them.
make ads open in new mindows.
After 15 seconds pass they are redirected to a new page.
Here is the code.
Put this in your php templates head section.
<?php
if($timed_redirect==1){
echo "<meta http-equiv=\"refresh\" content=\"$time;URL=$url\">";
} ?>
Then set this and put it in your php page that process the ... whatever
$timed_redirect=1;
$url='index.php';
$time='30';