Rotate Affiliate Offers: PHP Snippet

StevenInternet Marketing

We are always talking about split-testing offers in Affiliate Marketing. People who know about website coding probably won’t need the following code, however it might sound like black magic to people who have absolutely no clue about website coding.

The following code allows you to easily rotate 2 affiliate offers. You just need to create a file named go.php and paste the following code in it.

<?php
  $random = rand(1, 2);
  if ($random=='1') {
    header('Location: http://www.website-1.com/');
  } else {
    header('Location: http://www.website-2.com/');
  }
?>

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

To make sure this code will work, you need to replace http://www.website-1.com/ with a url to your first offer, and http://www.website-2.com/ with a url to your second offer.

Then you simply need to upload this file to your FTP server.

Now, when a visitors goes to visit your file go.php, they will be randomly redirected to one offer or the other.

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

Learn how I made $33,543 online in the past 12 months.

Simply input your best email below to get started.

No thanks, I have enough money