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.

Counting the number of clicks without redirect?

Discussion in 'PHP' started by mahmood, Jul 12, 2006.

  1. #1
    I see some directories that count the number of clicks on a link without having a redirect page. How is that?
     
    mahmood, Jul 12, 2006 IP
  2. kuepper

    kuepper Peon

    Messages:
    80
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The link could have a Javascript event that counts the clicks, or it could redirect to a PHP page that has a header redirect to the new page (therefore seemingly instant).
     
    kuepper, Jul 12, 2006 IP
  3. mahmood

    mahmood Guest

    Messages:
    1,228
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    With javascript how they save the result?

    And about the other the whole point is not to have a redirect because people wouldn't be interested in adding links.
     
    mahmood, Jul 12, 2006 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    AJAX could send the click event to a php file that stores it in the database.
     
    T0PS3O, Jul 12, 2006 IP
  5. mahmood

    mahmood Guest

    Messages:
    1,228
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks, this seems to be what I need.
     
    mahmood, Jul 12, 2006 IP