Need Help : Passing Entire URLS as variables

Discussion in 'Programming' started by bbardot, Jan 13, 2009.

  1. #1
    Hi,

    I'm doing some tracking with one of my websites. I'm currently passing variables to the next page in a form. Eg

    http://www.mysite.com/?var=value

    However, there are some people directly entering the site and from other sites be it google, yahoo etc.

    Site is written in PHP but javascript is used to on the next page to get the information.

    I need to find out what the referring site is and pass it to the variable.

    All suggestions welcome.
     
    bbardot, Jan 13, 2009 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    In PHP you can get the referrer with $_SERVER['HTTP_REFERER'].
     
    mwasif, Jan 13, 2009 IP