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.

Top Referrer List

Discussion in 'Programming' started by phgonline, Nov 10, 2006.

  1. #1
    Does anyone know how to create a top 10 referrer list, which shows hits coming in and hits going out? I need something like that for my link exchanges.
     
    phgonline, Nov 10, 2006 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    access_log stats programs do that for you
    for example webalizer or its new version angolizer has a configurable top x referrer list
    a well as many other top ( top entry, top URL, etc )

    others here in DP may give you names of other fine SW doing exactly that and much more as well
     
    hans, Nov 10, 2006 IP
  3. phgonline

    phgonline Peon

    Messages:
    333
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well actually I just want to show like the top 10 list in a block in my website, then whatever links get the most referrers will show in the top 10. Examples are umm zanyvideos.com, I want it to show like where his link partners are at and when you click "see all referrers" it shows the hits in and out.
     
    phgonline, Nov 10, 2006 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    I do something quiet similar
    a top list of top URL
    same could be done top list by referrers

    i do it manually out of the output produced by angolizer
    may be some stats SW does is automatically already

    I convert my top list manually into an RSS feed and insert it via PHP incudes into the pages I want it to appear
     
    hans, Nov 10, 2006 IP
  5. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #5
    easy -
    1. create a database table with 2 fields - [1] url [2] count
    2. create a php file that takes a $_GET argument - the referer's url
    3. in the php file, save the $_GET variable into a database table with count = 1 if the url does not already exist. if already exist, simply increase the count by 1
    4. use a simple sql statement with order by desc and limit to 10 to list the top 10 referers

    ;)
     
    daboss, Nov 11, 2006 IP
  6. phgonline

    phgonline Peon

    Messages:
    333
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hi, even though that sounds easy to you I have no idea what you are talking about lol. I have made a sql database already, but the rest I am confused....
     
    phgonline, Nov 11, 2006 IP
  7. whateverandever2

    whateverandever2 Peon

    Messages:
    881
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
  8. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #8
    itr's Christmas time
    may be daboss shows us the complete php script - because it sounds potentially better than my current solution which involves final hand writing of my top URL RSS feed
    if all would be in a nce mysql ith could all be daily updated and fully automated once the data ar correctly accumulated from the access_log file

    it basically sound so easy that I belief a PHP pro can do it in a few dozen lines of code
    :)
     
    hans, Nov 20, 2006 IP