I thought I’d write a small post about basic cookie stuffin and show you a few methods.
First is the Java Method…
There are a buttload of ways to cookie stuffing with Java.
Open a popup in a new window and redirect user to your affiliate link.
<script language=”javascript”>
window.open(‘http://affiliatelink.com‘,’WindowTitle’,’width=300, height=300, toolbar=NO, resizable=YES’);
</script>
Most people use a pop up blocker, so this doesn’t always work.
If that user has already been stuffed, you don’t want to drop another cookie. This will disable the pop up if the user has been already stuffed…
<script>
<!– Begin
//Pop-under window - javascriptkit.com
var popunderSpaFinder=”http://MyCookieLink.com″
var winfeatures=”width=780,height=580,scrollbars=1,res izable=1,toolbar=1,location=1,menubar=1,status=1,d irectories=0″
var once_per_session=1
function get_cookie(Name) {
var search = Name + “=”
var returnvalue = “”;
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(”;”, offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie(’popunderSpaFinder’)==”){
loadpopunderSpaFinder()
document.cookie=”popunderSpaFinder=yes”
}
}
function loadpopunderSpaFinder(){
win2=window.open(popunderSpaFinder,””,winfeatures)
win2.blur()
window.focus()
}
if (once_per_session==0)
loadpopunderSpaFinder()
else
loadornot()
// End –>
</script>
I’m not even going to go into iFrames. This old method still works, but is easily detectable and can get you banned from a affiliate pretty quickly.
Here’s the code, although I suggest staying away from it…
<iframe src =”http://MyAffiliateLink.com” width=1 height=1></iframe>
PHP Methods
Use header redirect to redirect the page
header(’Location: http://MyAffiliatelink.com’);
This works very well, but while using the image tag method, it does not change the referrer so it is still not a fool proof method.
While stuffing images with image tag, its always good idea to stuff an with image that doesn’t exist and then redirect that to a php file that has the code to redirect to affiliate link. For example you link to an image like http://www.mysite.com/fuzzyshit.jpg and that image doesn’t exist, but you post this link everywhere, then you have something like this in your .htaccess file
Redirect /image.jpg http://www.mysite.com/affiliate_redirect.php
While stuffing in your own site, you can hide the image with setting image withing a hidden layer, e.g. <div id=”stuff” style=”display:none;”> put your image here </div>.
Cloaking Your Shit
You can use a Java Meta Refresh to accomplish this…
This meta refresh method makes a separate page that redirects it to the affiliate page while keeping the referrer as “blank” so you can hide your source of traffic…
<META HTTP-EQUIV=”REFRESH” CONTENT=”1;URL=http://MyAffiliateLink.com”>






















































hi, i gotta question. would be nice if you answered in the comments. if you use js (i have no idea of js) for stuffing, do you use both the second and the first script in this article or only the second if you dont want to doubledrop cookies? thank you very much