Redirect traffic between three different pages?

dre2027

Newbie
Joined
Jul 21, 2008
Messages
15
Reaction score
3
Is there a way to redirect/cycle traffic between three different pages?

I mean, traffic comes in to a redirect script [index.php] then script...
- sends the first visitor to page-a.php
- sends the next visitor to page-b.php
- sends the next visitor to page-c.php

...and then starts the cycle over by sending the next visitor to the top of the sequence at page-a ... and continues cycling indefinitely, for as long as visitors continue showing up.

I know if it were just one page i wanted to redirect someone to I'd use basic php redirect:

?php
header( 'Location: h**t*t*p*:*//*xxx.*yoursite.*xxx/*new_page.html' ) ;
?

...but to cycle through three different pages evenly I have no clue.

There used to be a free app called "split test generator" [i think that was its name] that used to do this cycling but the script was faulty after just three visitors -- lol -- and was not worth the hassles of installing. The site is now long dead.

Anyhow, if there is a script or bit of php code available that can cycle visitors evenly among three different landing pages please please please let me know.

Thanks.

Oh. Sorry about slaughtering the fake url. I haven't made 15 posts yet, so the script here wouldn't let me post that fake link in my post. I had to obfuscate the fake link somewhat to get this posted. Thanks for the help.
 
This is EXACTLY what I was looking for - now if I could only get this to work with Brad's plug-in. Thanks again SweetFunny
 
Try This

PHP:
<?
//Replace first,second,third with your required urls
//You can add more urls if you like, just follow the template:
//$url[x] = 'some url'

$url[0] = 'First Url';
$url[1] = 'Second Url';
$url[2] = 'Third Url';

//Select a random url and redirect to it
header('Location:'.array_rand($url));
?>

aReJay
 
Back
Top