TheInsider
Registered Member
- Jan 18, 2008
- 99
- 102
I use the following code to make all my promoted affiliate programs get uniques... Example.. You send traffic to one offer, normally only that offer gets the traffic.. Using my method, all your offers get the traffic, basically PADDING the stats..
First off, make a file called image.jpg that is a 1x1 white pixel image. Replace the urls below with the urls of all your link codes you want to send traffic to. You can remove or add links by increasing/decreasing the $v = (rand()%8);
variable. Remember 0 is counted as a #, so if you have nine links, you use 8 in the variable.
THEN, as an added bonus, my script logs the information of the click to a file called log.html. Just create a 0 byte file in the directory, before executing..
If you pass the variable [email protected] it will log the email of the person. Everything is pulled from the environment.. Time, IP and referral.
The best part of this script is there is no hidden frames. Everything is loaded in the background. AND you call it as an image!
Example: <img src="http://www.testserver.com/image.php?e=%SURFEREMAIL%">
Just take the following code and save it as image.php on your server...
Oh, and to see who loaded your page.. just goto http://www.testserver.com/log.html in your web browser.
If you experience problems, make sure that log.html is read/writable (777)
First off, make a file called image.jpg that is a 1x1 white pixel image. Replace the urls below with the urls of all your link codes you want to send traffic to. You can remove or add links by increasing/decreasing the $v = (rand()%8);
variable. Remember 0 is counted as a #, so if you have nine links, you use 8 in the variable.
THEN, as an added bonus, my script logs the information of the click to a file called log.html. Just create a 0 byte file in the directory, before executing..
If you pass the variable [email protected] it will log the email of the person. Everything is pulled from the environment.. Time, IP and referral.
The best part of this script is there is no hidden frames. Everything is loaded in the background. AND you call it as an image!
Example: <img src="http://www.testserver.com/image.php?e=%SURFEREMAIL%">
Just take the following code and save it as image.php on your server...
PHP:
<?php
header('Content-type: image/jpeg');
readfile('image.jpg');
#Get our variables for writing
$IP = $_SERVER['REMOTE_ADDR'];
$referral = $_SERVER['HTTP_REFERER'];
$time = date ("F dS, H:i");
$e = (isset($_GET["e"]) && !empty($_GET["e"]) ? $_GET["e"] : "");
srand(time());
$v = (rand()%8);
if ($v == 0) { $contents = file_get_contents('http://url.1.com'); }
if ($v == 1) { $contents = file_get_contents('http://url.2.com'); }
if ($v == 2) { $contents = file_get_contents('http://url.3.com'); }
if ($v == 3) { $contents = file_get_contents('http://url.4.com'); }
if ($v == 4) { $contents = file_get_contents('http://url.5.com'); }
if ($v == 5) { $contents = file_get_contents('http://url.6.com'); }
if ($v == 6) { $contents = file_get_contents('http://url.7.com'); }
if ($v == 7) { $contents = file_get_contents('http://url.8.com'); }
#Get our File Handle and set for appending
$filehandle = fopen ("log.html", "a");
#Lets begin to write!
fwrite ( $filehandle, "<b>Time Accesssed:</b> $time<br>" );
fwrite ( $filehandle, "<b>Email:</b> $e<br>" );
#Does the IP exist or referer? Check before attempting to write!
if ( $IP != null )
{
fwrite ( $filehandle, "<b>IP Address:</b> $IP<br><hr>" ) ;
}
if ( $referral != null )
{
fwrite ( $filehandle, "<b>Referer:</b> $referral<br><hr>" );
}
fclose ( $filehandle );
?>
Oh, and to see who loaded your page.. just goto http://www.testserver.com/log.html in your web browser.
If you experience problems, make sure that log.html is read/writable (777)