PDA

View Full Version : Help with php affiliate cloaking code



3stepincome
10 Mar 2009, 11:07 PM
Hi there!

So long story short, I wrote my own e-book, and now I'm working on putting affiliate links in it and such. I read into affiliate link cloaking, and found out the .php code is my best solution. I'm using this code right now:


<?php
header("Location:affiliatelink");
exit();
?>

I saved it as a .txt file and then uploaded it to a sub-directory of my domain via FileZilla.

I got it to work brilliantly on one domain of mine that contained .ws, but I just registered my .com domain with the same company and I can only get the redirect to work on this one.

Instead of http://www.mysite.com/recommends/txtfilename showing up when I get to the affiliate website...the affiliate website link shows in the URL bar instead.

I'm thinking that it might be that I have 2 domains registered right now and only one is able to do it, but other than that I'm stumped. Is it a problem with the way I'm saving the file? I saved the last one as a .txt and it worked when I just put the name of the file in, but for this new domain I'm using, it doesnt seem to be working. I'm stumped :(

Any help would be greatly appreciated! Thanks!

Alan
11 Mar 2009, 02:30 AM
Sorry now if this is a stupid question... but you saved the following code into a .txt file and it executed properly? :S


<?php
header("Location:affiliatelink");
exit();
?>