Results 1 to 2 of 2

Thread: Help with php affiliate cloaking code

  1. #1
    3stepincome Guest

    Help with php affiliate cloaking code

    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!

  2. #2
    Join Date
    Feb 2007
    Location
    Ireland
    Posts
    1,007
    Sorry now if this is a stupid question... but you saved the following code into a .txt file and it executed properly? :S

    PHP Code:
    <?php
    header
    ("Location:affiliatelink");
    exit();
    ?>
    “The best thing about a boolean is even if you are wrong, you are only off by a bit.”

Similar Threads

  1. CMS advice (php)
    By Littlened in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 07 Jul 2007, 05:02 AM
  2. Affiliate linking & cloaking
    By dcshoeco1 in forum General Questions
    Replies: 0
    Last Post: 08 Aug 2006, 06:39 AM
  3. executing php code in a string
    By Littlened in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 1
    Last Post: 13 Jul 2006, 10:48 AM
  4. eval() if the string isn't 100% PHP code?
    By compuXP in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 18 Jul 2005, 05:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •