106 users online (4 members and 102 guests)  

  Results 1 to 2 of 2


  1. Replies: 3
  2. Anyone know of a bookmark counter script?    Forum: Javascript Forum
    Replies: 2
  3. Replies: 2
  4. Replies: 1
  1. #1
    Derek's Avatar
    Be Yourself

    Join Date
    Aug 2001
    St. George, Utah, USA

    link counter script...easy?

    To create a link counter script could you just:

    create a mysql table with the follow something like

    id linkcounter
    1 tutorial link
    2 resoure link
    3 tools link

    Then create another one with the subject being "Hits" and all I'd have to do is make a script that each time the user clicks the link is to query mysql and add one to the hits on that perticular id? sorry if it seams kinda confusing.

  2. #2
    Kirtie's Avatar
    New User

    Join Date
    Sep 2006
    Fargo, ND USA

    Re: link counter script...easy?

    One way is to create a function in PHP using $_SERVER['REMOTE_ADDR'];
    Create a line in the code that inserts a "1" into a tinyint field in your MySQL table, so you'll have something to sum up (total hits).
    Using the $_SERVER['REMOTE_ADDR'] command will also help you know which hits are unique and which ones are return visitors.
    Just an idea (personally I use the invisible hit counter from statcounter.com), hope it helps you.

Tags for this Thread