Black Hat Forum
Go Back   Black Hat Forum > Black Hat SEO Forum > Cloaking and Content Generators

Cloaking and Content Generators Discuss Cloaking, Doorway pages and Automatic content generators for search engine optimization

Search
 
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-29-2008, 07:11 AM
OnFire25's Avatar
Registered Member
 
Join Date: Mar 2008
Posts: 93
Thanks: 203
Thanked 27 Times in 13 Posts
Activity: 17%
Longevity: 21%
Today: 0/5
Default Redirecting Help Pls

For split testing is it possible to create a page that will randomly select one page to display to a visitor.

Nothing blackhat here I know but I have an idea based on c0nversi0nPr0fit that I haven't seen anywhere else.

As c0nversi0nPr0fit only allows tracking of 3 versions of a landing page I am trying to create an index.php that will randomly select from index1.html, index2.html and index3.html.

I have used the following code :

Code:
<?php
 $pageid =  rand(1, 3);
 if ($pageid == 1){$location = "http://www.google.com";}
 else if ($pageid == 2){$location = "http://www.yahoo.com";}
 else if ($pageid == 3){$location = "http://www.msn.com";}
 echo "<a href=$location>$location</a>";
?>
and this echo does display a random pagelink in text but I can not work out how to get it to open the selected/displayed location.

As you can guess I am not a php coder

So happy for any workable suggestions


Thanx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-29-2008, 07:33 AM
MiLiTARYiV's Avatar
Jr. VIP
 
Join Date: Jan 2008
Posts: 719
Thanks: 17
Thanked 57 Times in 10 Posts
Activity: 39%
Longevity: 28%
Today: 1/5
Default Re: Redirecting Help Pls

There is. I read about how to do that in the Beating Adwords book but can not remember how
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-29-2008, 07:46 AM
BozoClown's Avatar
Jr. VIP
 
Join Date: May 2008
Posts: 339
Thanks: 48
Thanked 73 Times in 44 Posts
Activity: 32%
Longevity: 15%
Today: 1/5
Default Re: Redirecting Help Pls

Here you go

Code:
<?php
 $pageid =  rand(1, 3);
 if ($pageid == 1){$location = "http://www.google.com";}
 else if ($pageid == 2){$location = "http://www.yahoo.com";}
 else if ($pageid == 3){$location = "http://www.msn.com";}
 echo "<meta http-equiv="refresh" content="0;url=$location">";
?>
__________________
The Following 3 Users Say Thank You to BozoClown For This Useful Post:
Superman (06-29-1938), Batman (04-30-1938), Chuck Norris (03-09-1940)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to BozoClown For This Useful Post:
OnFire25 (09-29-2008)
  #4 (permalink)  
Old 09-29-2008, 10:06 PM
OnFire25's Avatar
Registered Member
 
Join Date: Mar 2008
Posts: 93
Thanks: 203
Thanked 27 Times in 13 Posts
Activity: 17%
Longevity: 21%
Today: 0/5
Default Re: Redirecting Help Pls

Hi Bozo,

Thanks for the code - slight problem when I upload this to my host using PHP version 5.2.6 I get the following error

Code:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/xxxxxxxxxxx/public_html/xxxxxxxxxxx/index.php on line 6
Any thoughts on this ?


Thanx

Last edited by OnFire25; 09-29-2008 at 10:07 PM. Reason: spelling correction
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-29-2008, 10:12 PM
BozoClown's Avatar
Jr. VIP
 
Join Date: May 2008
Posts: 339
Thanks: 48
Thanked 73 Times in 44 Posts
Activity: 32%
Longevity: 15%
Today: 1/5
Default Re: Redirecting Help Pls

Oops I forgot to escape the quotations
Code:
<?php
 $pageid =  rand(1, 3);
 if ($pageid == 1){$location = "http://www.google.com";}
 else if ($pageid == 2){$location = "http://www.yahoo.com";}
 else if ($pageid == 3){$location = "http://www.msn.com";}
 echo "<meta http-equiv=\"refresh\" content=\"0;url=$location\">";
?>
That should work.
__________________
The Following 3 Users Say Thank You to BozoClown For This Useful Post:
Superman (06-29-1938), Batman (04-30-1938), Chuck Norris (03-09-1940)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to BozoClown For This Useful Post:
OnFire25 (09-29-2008)
  #6 (permalink)  
Old 09-29-2008, 10:54 PM
OnFire25's Avatar
Registered Member
 
Join Date: Mar 2008
Posts: 93
Thanks: 203
Thanked 27 Times in 13 Posts
Activity: 17%
Longevity: 21%
Today: 0/5
Thumbs up Re: Redirecting Help Pls

Thanx

that works.

Now all I need to get working is some javascript in this to get the split testing results.

the code is
<script language="javascript" src="http://www.xxxxxxxxxx.com/tracker.php?uid=9&cid=12"></script> which is supposed to track visitors is there any special codes that are needed because I have tried this and the mysql is not being updated so I guess that how I have entered the code is wrong

Truely grateful for the support and help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-29-2008, 11:40 PM
BozoClown's Avatar
Jr. VIP
 
Join Date: May 2008
Posts: 339
Thanks: 48
Thanked 73 Times in 44 Posts
Activity: 32%
Longevity: 15%
Today: 1/5
Default Re: Redirecting Help Pls

Make sure you have set up the database right and are actually updating it with php. mysql usually displays errors when you have a problem. You have to write the code that updates it on every visit or make user the script is doing that for you.
__________________
The Following 3 Users Say Thank You to BozoClown For This Useful Post:
Superman (06-29-1938), Batman (04-30-1938), Chuck Norris (03-09-1940)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 09-30-2008, 12:06 AM
BANNED
 
Join Date: Jul 2008
Posts: 706
Thanks: 5
Thanked 121 Times in 88 Posts
Activity: 6%
Longevity: 10%
Today: 0/5
Default Re: Redirecting Help Pls

lol that's a really messy way to do something simple...
What happens if you want to add more sites? More variables and elsfis?
Code:
<?php
$redirects = array(
        "http://www.site1.com",
        "http://www.site2.com",
        "http://www.site3.com",
        "http://www.site4.com",
        "http://www.site5.com"
);

header("Location: " . $redirects[mt_rand()%count($redirects)] ."");
?>

Last edited by bhnoobz; 09-30-2008 at 12:08 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to bhnoobz For This Useful Post:
OnFire25 (09-30-2008)
  #9 (permalink)  
Old 09-30-2008, 10:01 AM
OnFire25's Avatar
Registered Member
 
Join Date: Mar 2008
Posts: 93
Thanks: 203
Thanked 27 Times in 13 Posts
Activity: 17%
Longevity: 21%
Today: 0/5
Default Re: Redirecting Help Pls

Hi bhnoobz

Purrrrrrrrfect thanx for K I S S ing it for a non coder.

Have you any suggestions about getting the javascript into the php code have been tryng but it is not updating the mhsql database so I have f***ked it up somewhere.

What I am doing is taking a ppc tool and attempting to reuse it as a split testing tool - I do like to look outside the box.

Appreciate your time and suggestions
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Add Your Link



Site protected by Firewall Script


Sitemap: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54