What would it take to do this?

Discussion in 'Programming' started by adsensenewb, Jun 11, 2008.

  1. #1
    Here is what I am trying to do:

    I'll try to describe it as clearly as possible



    I have a main website - www.maindomain.com

    On that website, there is a signup page & link. The URL is encoded with a basic referral ID #.... something like this.

    https://www.signupserver.com/?referralid=12345

    ~~~~~~~~

    What I want to be able to do is this.

    Say someone else has a separate domain name.... say www.anotherdomain.com
    That domain is set to forward to maindomain.com using a masked forward.

    If someone visits www.maindomain.com via. the forward-ing domain, and goes to the sign up page, the signup URL would be encoded with a different number, based on the specific forwarded domain that the person used.

    ~~~~~~~~~

    So something like:

    Singup link: https://www.signup.com/?referral=$variable



    if forwarded domain = aaa.com

    then $variable = (value set manually by me)


    if forwarded domain = different domain

    then $variable = different value.


    so forth and so forth.

    ~~~~~~~~

    Any help would be appreciated. I am in the process of learning basic PHP & JS, so if it would be as simple as using certain functions to obtain & read the redirecting domain, I could probably figure it out on my own if I had some pointers to work with.
     
    adsensenewb, Jun 11, 2008 IP
  2. adsensenewb

    adsensenewb Peon

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Perhaps have the other domain redirect to a URL like www.mydomain.com/?idtagnumber=12345

    then do something like:

    https://www.signup.com/?referralid=$variable

    ~~~~~~~~~~
    when someone visits from forwarded domain

    setcookie (value is based on idtagnumber)


    if idtagnumber = 12345

    then $variable = 12345

    or

    if cookie = 12345

    then $variabl = 12345


    otherwise $variable = default

    ~~~~~~~~~~~~~~~


    How complicated would this be to set up?



    Thanks
     
    adsensenewb, Jun 11, 2008 IP