Thread: link counter script...easy?
Results 1 to 2 of 2
Help with adding named lebel to link tracking counter Forum: CGI Perl ForumReplies: 3
Script to display names of files in that folder as link Forum: HTML ForumReplies: 2
Link Exchange with 'Free hit counter' site (PR5) Forum: Link ExchangeReplies: 1
12-07-2001, 01:05 AM #1
link counter script...easy?
To create a link counter script could you just:
create a mysql table with the follow something like
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.
09-07-2006, 10:47 PM #2
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.