database/web experts......

Discussion in 'OT Technology' started by NEOxMorpheus, Dec 9, 2005.

  1. NEOxMorpheus

    NEOxMorpheus Real OG

    Joined:
    Oct 24, 2001
    Messages:
    1,001
    Likes Received:
    0
    Working on this project and I need some help. I need to keep track of how many times a html link has been clicked and store it in a database. Any help?
     
  2. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Make the link go to a CGI or PHP script and every time someone clicks it, have it pull the number from the DB, incremement it, store it back to the DB and then redirect them to the linked page. It's not a pretty solution, but it'll work.
     
  3. Yep

    Yep Knick knack paddy whack, give the old dog a bone

    Joined:
    Jan 22, 2001
    Messages:
    4,603
    Likes Received:
    0
    Location:
    South Jersey
    You can have the script return the HTML to the browser instead of redirecting as well.
     
  4. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    True, but that won't work too well for an external link.
     
  5. Keyzs

    Keyzs OT Supporter

    Joined:
    Nov 3, 2003
    Messages:
    814
    Likes Received:
    0
    Location:
    Charlotte, MI
    The only way your going to know if they click on an external link on your page is if you mask the link. Direct the link to a page with script to foward them to the correct destination and write it to a database.

    This is why the are alot of the href=www.mysite.com\redirect.htm?link=www.xxx.com

    Redirect.htm is just a page that records the action and forwards you on to the www.xxx.com

    (I can be more specific if you want it in ASP...)
     
  6. NEOxMorpheus

    NEOxMorpheus Real OG

    Joined:
    Oct 24, 2001
    Messages:
    1,001
    Likes Received:
    0
    thanks for the help, i think i'm goinna just try out some of the methods stated using php
     

Share This Page