Quick script I wrote to increase your clicks

TheInsider

Registered Member
Joined
Jan 18, 2008
Messages
99
Reaction score
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...

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)
 
Why I am by no means an expert, this sounds like CS. Or am I totally off?
 
very nice!
you could even build "fresh" email lists with this haha

Now you are understanding the true potential! ;)

I've actually used this script to make a non-optinlist an optinlist, because I suddently had timestamps and dates of when they joined my list, all simply because they happened to open an email they received ;) hahah
 
Last edited by a moderator:
very nice!
you could even build "fresh" email lists with this haha

Don't mind me asking the noob question of the day, but how would you go about building an email list with this method?
 
Last edited by a moderator:
because it grabs the email address , ip , and time stamp , ip and time stamp to make it seem as a "proof" of opt in. the email address that it logs can be used to send out emails and if anything arises , you can use the email , ip , time stamp as "proof" of an "opt-in"

Ok cool, thanks for the response.

I'm having troubles making this work.. *sigh*

Can anyone give me a hand, I don't understand what file to call the images/how to even call all the images.. I've tried different ways but it always comes up with broken images or nothing at all.
 
Last edited by a moderator:
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...

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)

You could of made this script lot shorter and easier for people to add and remoe links. :P
 
I am far from a programmer! Hahaha.. When the need arises I sit down and try to come up with a solution. Sometimes I do it in 5 minutes, sometimes it takes me weeks! I should take a php class haha.. Either way, I just thought it would be helpfull to some.
 
Did you create a 1x1 image.jpg file and put it in the directory of the program? You can do this with any image software. Just say file new size 1 pixel by 1 pixel, white background, then save it for web.
 
I can't program my way out of a wet paper bag but I'm seeing some potential in this. Gonna play with it a little tonight. Thanks for the share.
 
I've tried everything.. does anyone have an example to show? Mine don't seem to work.
 
Maybe make the image src on your page be image.jpg, not the image.php like he has mentioned above. It looks like the code may be telling it to treat image.jpg as php and run the script. I haven't played with it yet so I may be off on this but unless that's the case I don't see why you would create the 1x1 image file because it isn't referenced anywhere on the page.
 
Maybe make the image src on your page be image.jpg, not the image.php like he has mentioned above. It looks like the code may be telling it to treat image.jpg as php and run the script. I haven't played with it yet so I may be off on this but unless that's the case I don't see why you would create the 1x1 image file because it isn't referenced anywhere on the page.

Unfortunately, I tried deleting the 1x1 image and everything.. Still no luck

EDIT:

This is what I'm using.

index.html
Code:
<html>
<head><title>Test Title</title>
</head>
<body>
    <font face='verdana' size='1'>Sally doesn't sell sea shells on the sea shore koz she's a hooker.</font><br/>
    <img src='http://freestuffeasy.info/tester/image.php'>
</body>
</html>
image.php
Code:
<?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 = 1;

if ($v == 0) { $contents = file_get_contents('offer1'); }
if ($v == 1) { $contents = file_get_contents('offer2'); }
if ($v == 2) { $contents = file_get_contents('offer3'); }
if ($v == 3) { $contents = file_get_contents('offer4'); }
if ($v == 4) { $contents = file_get_contents('offer5'); }

#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 );
?>
 
Last edited:
I think I may have been wrong with what I said earlier. Anyway, a couple things to try.

First create the 1x1 .jpg image and make sure to put it into to the proper place. It looks like you're using the "tester" folder, so put it in there. Second, in the php code where it says readfile('image.jpg'); he has his image.jpg in, and the script is looking for the image.jpg, in the root. If yours is in a sub-folder /tester/image.jpg, you need to change that piece of the code to the (correct) absolute path. Make it readfile('http://freestuffeasy.info/tester/image.jpg');

Give that a whirl and see if it does anything.
 
Last edited:
I dont know what the problem is, my log records every view but I'm not getting a single click showing...
 
ANyone is so kind to explain to me how do you put PHP in html?
Please :D
 
I still don't get how this captures everyones emails ?

I just edit this and paste this code on a site and i'll get all my visitors emails ?

OR , I edit the code , email out to a partners emails list and I get all my partners emails as optin if they happen to just open their email ?

Whichever way , this seems really powerful .
 
Back
Top