1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Referrer tracking and conditional content

Discussion in 'PHP' started by kipling, Jun 22, 2005.

  1. #1
    I'm looking for a way to track if visitors are coming from a site and then returning to it from another.

    Ideally I would like to serve up very slightly different content depending on whether the referrer is this other site or not. What's the best way of doing this? PHP?

    Thanks in advance
     
    kipling, Jun 22, 2005 IP
  2. davedx

    davedx Peon

    Messages:
    429
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you want to alter the content then yeah PHP is the way to go.

    Use $_SERVER['HTTP_REFERER'] to get the referrer URL. Bear in mind not all clients send referral information.

    Good luck :)
     
    davedx, Jun 22, 2005 IP
  3. kipling

    kipling Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks davedx :)

    Does anyone have any advise about the best way to code for this? I'm a bit of a PHP novice.

    Good web sites would be useful too - I will look myself but I'm just wondering if anyone wanted to offer me the benifit of their experience/knowledge.
     
    kipling, Jun 23, 2005 IP