Need help on how to use this script.

Discussion in 'PHP' started by TruthTrekker, Mar 13, 2008.

  1. #1
    I just ordered a book on Sitepoint for PHP/MySQL. I'm not lazy, I just don't understand PHP scripting.

    I downloaded this script to mask affiliate codes and I sort of understand it. I was hoping some of you could give me - a N00B - more concrete examples of applying this script.

    Save this page as jump.php and when linking to this script use the following:
        <a href="jump.php?m=XXXXXX">XXXXXX</a> 
    Where XXXXXX is your merchant. 
    */
    $m = $_GET['m'];
    if ($m == "") {$link = "http://www.stevedawson.com/mobiles/";} // Default Blank
    if ($m == "Just Phones") {$link = "http://www.awin1.com/awclick.php?mid=97&id=38362";}
    if ($m == "UKPhoneShop") {$link = "http://tracker.tradedoubler.com/click?p=985&a=949731&g=5119";}
    
    /*
    To add more jump links, just copy and paste one of
    the lines above and modify the $m and $link values
    */
    
    header("Location: $link"); // Jump to the hiddden affiliate URL above
    exit();
    ?>
    Code (markup):
     
    TruthTrekker, Mar 13, 2008 IP
  2. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #2
    Barti1987, Mar 13, 2008 IP
  3. TruthTrekker

    TruthTrekker Guest

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think I got it....

    Thanks....
     
    TruthTrekker, Mar 14, 2008 IP