I found this code a while back, I looked and can't find it on BHW, so here it is.
Make a file called links.txt and add your affiliate links to it like below.
links.txt
PHP Code
Then make 2 files, on called goto.php
and the other goto2.php
Upload them to your server and send the traffic to http://www.yoursitename.com/goto.php
Adam
Make a file called links.txt and add your affiliate links to it like below.
links.txt
PHP Code
Code:
PHP Code:
www.google.com
www.yahoo.com
www.msn.com
Then make 2 files, on called goto.php
Code:
<?php
echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.yoursite.com/goto2.php\">";
?>
and the other goto2.php
Code:
<?php
// Open our links file
$sites = array_map("trim", file("links.txt"));
// Grab a random URL
$redirect = $sites[array_rand($sites)];
$referer = $_SERVER['HTTP_REFERER']; if($referer == "")
// Redirect to our Random URL
echo "<meta http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">";
else
{
// Referrer is not blank send traffic to our homepage
echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.yoursite.com\">";
}
?>
Upload them to your server and send the traffic to http://www.yoursitename.com/goto.php
Adam