Ok, I mashed up a bunch of code from another thread and made a nice little script.
Keep in mind, I am not a programmer...I can just put things together and test until it seems to work. Much like how Edison worked; Trial and Error...
Ok, so here's what I've come up with:
The challenge...
I wanted a script that could hide traffic from affiliate networks by checking if a blank referrer was being passed along during a double meta refresh and would boot the redirect if it passed along a referrer, but I also wanted to be able to alternate offers and mix up the traffic a little.
This way there isn't just one offer converting at a super high % and you could rig it with another offer that you KNOW will never convert and keep the numbers down....
Here we go -
First create a text file called "offers.txt" in notepad and just list a few urls for testing purposes (you can change these to you affiliate urls later)
List them like this, one on top of the other:
(Note: Don't put the http:// part in there.)
Ok, that part's done...upload to server.
Now create a text file called "vip.php" in notepad and copy and paste this into it...
Ok, that part's done...upload to server.
Now create a text file called "go.php" in notepad and copy and paste this into it...
Ok, that part's done...upload to server.
Now you're done. To test it, just go to the first link in the chain...
That's it! If anybody more knowledgeable wants to clean up the code or add anything special - you're welcome to it.
Love,
D
P.S. Special thanks to Genjutsu, Foxler, and Gestserver.
Keep in mind, I am not a programmer...I can just put things together and test until it seems to work. Much like how Edison worked; Trial and Error...
Ok, so here's what I've come up with:
The challenge...
I wanted a script that could hide traffic from affiliate networks by checking if a blank referrer was being passed along during a double meta refresh and would boot the redirect if it passed along a referrer, but I also wanted to be able to alternate offers and mix up the traffic a little.
This way there isn't just one offer converting at a super high % and you could rig it with another offer that you KNOW will never convert and keep the numbers down....
Here we go -
First create a text file called "offers.txt" in notepad and just list a few urls for testing purposes (you can change these to you affiliate urls later)
List them like this, one on top of the other:
Code:
www.google.com
www.myspace.com
www.badgerbadgerbadger.com
Ok, that part's done...upload to server.
Now create a text file called "vip.php" in notepad and copy and paste this into it...
Code:
<?php
echo "<meta http-equiv=\"refresh\"content=\"0;url=go.php\">";
?>
Now create a text file called "go.php" in notepad and copy and paste this into it...
Code:
<?php
// Open the File with offers to rotate
$sites = array_map("trim", file("offers.txt"));
// Choose a random site to shows
$redirect = $sites[array_rand($sites)];
$referer = $_SERVER['HTTP_REFERER']; if($referer == "")
//make the meta refresh to the random site in variable redirect
echo "<meta http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">";
?>
Now you're done. To test it, just go to the first link in the chain...
Code:
http://www.yourdomain.com/vip.php
Love,
D
P.S. Special thanks to Genjutsu, Foxler, and Gestserver.
Last edited by a moderator: