![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jul 2006
Location: NoHo
Posts: 5,970
|
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>
__________________
![]() ICQ: 266990876
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Join Date: Jun 2006
Location: Porto Alegre, RS - Brazil
Posts: 12
|
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
__________________
[]´s Alexwoj from Brazil http://megacash.warpnet.com.br Adult Paysites, Affiliate Programs, Web Hosting and Internet Marketing in Brazil, since 1997. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
Here's a real simple way to do it:
Code:
<?php $urlArray = array( "http://whatever", "http://whatever", "http://whatever", "http://whatever", "http://whatever", "http://whatever", "http://whatever", ); header("location: ".$urlArray[mt_rand(0, count($urlArray)-1)]); ?> If you want to do some weighting, some pseudo code (ugly) could be as follows: Code:
$count = ceil(100/count($urlArray)); $randchoice=rand(count($urlArray)%$count,0)-1; Make DAMN sure you just use a location: redirect, which is a 301. Google won't penalize you for those.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
$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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
bored
Industry Role:
Join Date: Aug 2003
Location: PORNCMS.com
Posts: 4,720
|
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.
__________________
# ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Join Date: Jul 2006
Location: NoHo
Posts: 5,970
|
thanks Grouchy/Fartfly .... I'll try those out...
![]()
__________________
![]() ICQ: 266990876
|
![]() |
![]() ![]() ![]() ![]() ![]() |