redirect user to different landingpages

cocaco

Regular Member
Joined
Oct 6, 2009
Messages
317
Reaction score
451
Hello,

i need a script which redirects every second user to another page. (so we can split the traffic to 2 landingpages)

in peudo code it would look like this:


i=1
i++
if (i%2=0)
redirect user to "http://xxxx"
else
redirect user to "http://yyyy"


thanks in advance,

i have no idea about php, only general understanding of programming.

thanks a lot for the guy helping me!"
 
Code:
if (date("s")%2==0) {
[COLOR=#000000][COLOR=#0000BB]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'Location: firstlandingurl'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
} else {
[COLOR=#000000][COLOR=#0000BB]header[/COLOR][COLOR=#007700]([/COLOR][COLOR=#DD0000]'Location: secondlandingurl'[/COLOR][COLOR=#007700]);[/COLOR][/COLOR]
}
 
Last edited:
Back
Top