![]() |
Any PHP Guys here tonight? Quick Question...
I need to test 3 landing pages with one domain... I currently have a simple php "if > else" statement on index.php that sends 50/50 to each LP .. here it is:
PHP Code:
What I am trying to avoid is to use a dynamic link such as domain.com/?id=landing1.html to test these 3 pages.. .instead I'd like to send traffic to domain.com and have some php code split the traffic... Any ideas? ... </NO trolls pls I am workin late and don't have time for ur shit, thanks> |
Hello!
I dont know if you wan't to try conversions. But if the answer is YES, you can try google optimizer. I have used it to test 5 tours, and it told me the tour that converted better for my paysite. You configure the tours, and the goal. It will tell you the tour that sends more users to the goal page. Search for google optimizer and try it. Sorry, cannot help you with the PHP code right now, because I am drinking some whisky and its almost 4 AM. But if you dont find any answer please PM me and tomorrow I can help you. And try google optimizer. See ya Alex |
Here's a real simple way to do it:
Code:
<?php If you want to do some weighting, some pseudo code (ugly) could be as follows: Code:
$count = ceil(100/count($urlArray)); Make DAMN sure you just use a location: redirect, which is a 301. Google won't penalize you for those. |
$link1='<somewhere>';
$link2='<somewhere>'; $link3='<somewhere>'; function getRandom(){ $r=rand(1,3); return $r; } switch (getRandom()) { case 1: $theLink=$link 1; break; case 2: $theLink=$link2; break; case 3: $theLink=$link3; break; } header $theLink |
just make rand a variable before your if statement. u can also use switch instead of if to make it easier to add more options.
|
thanks Grouchy/Fartfly .... I'll try those out... :)
|
All times are GMT -7. The time now is 03:43 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123