Results 1 to 2 of 2
  1. #1
    Join Date
    January 17th, 2005
    Hi there! I' realy a newbie at php. I want to protect my links using php. Here's an example:
    Originaly my merchant links would look like this:

    What do I need to do to make it look like this:

  2. #2
    ABW Ambassador sjangro's Avatar
    Join Date
    January 17th, 2005
    There are several ways to do this Marito, they all involve writing a script called offers.php that has a simple redirect in it.

    in PHP, that redirect looks like this:

    // the url you want to go to is in $url
    header("Location: $url");

    The different methods surround how you get the correct URL in there.

    If you have all of your links in a database like MySql with ID's, then you do a database lookup on the link ID, 25 in your example, and put the url in the $url variable before calling the redirect.

    Another method is to hide the LS link in the script and call the redirect with the id that's unique to the LS link, the offerid portion. Chez Noir shared a good way to do that here.

    Another way to do it is to put the destination link right in the url as a querystring parameter. That in itself doesn't accomplish the hiding part, but you can obscure it. There's a Link masking tutorial at that's been discussed here a few times.

  3. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Does CJ mind PHP redirects on affiliate links
    By alphawave in forum Commission Junction - CJ
    Replies: 8
    Last Post: January 25th, 2011, 07:37 PM
  2. Does GAN mind PHP redirects with their affiliate links
    By alphawave in forum Google Affiliate Network - GAN
    Replies: 1
    Last Post: January 24th, 2011, 03:44 PM
  3. Using PHP pages for redirect to affiliate links?
    By easylife in forum Midnight Cafe'
    Replies: 8
    Last Post: March 26th, 2009, 08:39 PM
  4. Need help with getting a PHP list to read my affiliate links
    By kreasor in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: August 22nd, 2008, 11:04 AM
  5. Using PHP to verify affiliate product links
    By Chopper in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: April 20th, 2005, 07:06 AM

Posting Permissions

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