[BlackHat] mmm cookies

[复制链接]
查看: 470   回复: 13
发表于 2012-5-24 00:31:51 | 显示全部楼层 |阅读模式
I am currently dropping cookies using this method:
  1. <img src="http://www.xxx.com/go/xxx" alt="" width="1" height="1" />
复制代码
where /go/xxx is my gocodes wordpress plugin redirection. I only have a few affiliate accounts and so far I have not been pulled up on it. They're probably glad of the sales!

Do you think I'm OK continuing this way or could I work smarter?
 楼主| 发表于 2012-5-24 00:32:58 | 显示全部楼层
I seriously recommend something else. The page where you want to drop the cookies on - add a .htaccess file in your domain-root that says:
  1. RewriteEngine ON
  2. RewriteRule ^footer-bottom.png$ http://www.your-affiliate-link.com/ [NC,L]
复制代码
Head over to your stylesheet, add:
  1. .footer_bottom {
  2.   background-image:url(http://www.your-url.com/footer_bottom.png)
  3. }
复制代码
Now edit your Template, and add following code to your footer-code:

PHP Code:
  1. <div class="footer_bottom"></div>
复制代码
Weee! No red "X" saying that this image doesn't exist, since it's loaded via the stylesheet, people will just not see it. :p

Best Regards
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:33:32 | 显示全部楼层
OK, thanks Nuls, I'll test it later and let you know if I have any problems.:thumb:
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:33:43 | 显示全部楼层
nice, i used to only do the mod_rewrite stuff without css..
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:34:08 | 显示全部楼层
Here's my modified .htaccess file where xxx is the uncloaked affiliate link:
  1. # BEGIN WordPress
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteCond %{REQUEST_FILENAME} !-d
  7. RewriteRule . /index.php [L]
  8. RewriteRule ^footer-bottom.png$ http://www.xxx.com/xxxx/ [NC,L]
  9. </IfModule>

  10. # END WordPress
复制代码
I have edited the stylesheet and footer as shown.

1 - how do I verify it works? I assume I should still get clicks on my aff stats?
2 - how do I add extra lines to the .htaccess file for all my other affiliate links?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:34:26 | 显示全部楼层
You could d/l fire cookie for firebug, and monitor the cookies dropped.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:34:55 | 显示全部楼层
Thanks, I think one way or another I can verify the cookies loading. I just need to know how to handle multiple cookies?

cheers

Here is my code again;
  1. # BEGIN WordPress
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteCond %{REQUEST_FILENAME} !-d
  7. RewriteRule . /index.php [L]
  8. RewriteRule ^footer-bottom.png$ http://www.xxx.com/xxxx/ [NC,L]
  9. </IfModule>
复制代码
# END WordPress
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:35:15 | 显示全部楼层
You'd need to set up different RewriteRules for any cookie, this was exactly the reason why I've made TCL, it pretty much sucks doing that manually on different domains.

i.e.
  1. RewriteRule ^footer-bottom.png$ http://www.xxx.com/xxx/ [NC,L]
  2. RewriteRule ^another-footer.png$ http://www.xxx2.com/xxx/ [NC,L]
复制代码
Now you'd need to create another div-class in your stylesheet and then randomly pick one of each in your template.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:35:37 | 显示全部楼层
oh, man! now I need to save up for TCL :mad: Was there a discount offer?

Tell you what though... I noticed that using the
  1. <img src="http://www.xxx.com/go/xxx" alt="" width="1" height="1" />
复制代码
actually loads a lot of the merchant site files, not just the aff cookie! Removing it has halved my page load time! Also I am now using Hyper Cache which has helped a lot too. Perhaps I'll make some more sales from the more impatient visitors now!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:35:53 | 显示全部楼层
Never ever use <img src>, AM will notice that, because, as you have already seen yourself, much stuff is being loaded. Doing it the "CSS Way" will not trigger these issues.

Coupon -> http://www.thecookielabs.info/?r=Larceny

Best Regards
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:36:14 | 显示全部楼层
Thanks Nuls - it'll be an early birthday present!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:36:25 | 显示全部楼层
Hi Larceny and Nuls! TCL purchased - awaiting download details, cheers!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:36:35 | 显示全部楼层
.footer_bottom {
background-image:url(mmm cookies) is the your-url.com my domain url or the affiliate offer url
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-24 00:36:45 | 显示全部楼层
hat is YOUR domain/footer-bottom.png which doesn't really exist.. but yeah, add your domain there...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则