PHP Affiliate Link Generator/Tracker???

Discussion in 'PHP' started by jawinn, Sep 5, 2006.

  1. #1
    I found a site where people submitted a form and the page they were redirected to had an link. It looked something like www.company.com/r=3245. The person could then email the link to their friends and if their friends clicked the link and filled out the forum the original user was credited as getting a referral to the site. I wish I could remember the site to give people examples but I don’t have the URL anymore.

    My questions are:
    1. Has anyone ever seen something like this?
    2. How complex would it be to build something like this?
    3. Does anyone know of any free versions?

    Thanks,
     
    jawinn, Sep 5, 2006 IP
  2. falcondriver

    falcondriver Well-Known Member

    Messages:
    963
    Likes Received:
    47
    Best Answers:
    0
    Trophy Points:
    145
    #2
    its quite basic: a database with id and redirection url, and if someone visits your index page with a parameter "?r=1234" you get the value of "r" (1234 here), search your database for the url with id 1234 and do some redirection like
    
    header("Location: http://website.com/?affiliate=5678"); 
    PHP:
    - done!
     
    falcondriver, Sep 5, 2006 IP