View Full Version : How do you display the number of times a certain item was clicked?

12-31-2005, 03:16 AM
Say I have a picture thats a link, or a text link. how would i, in php display the number of times it was clicked. for instance:

*link* hits:# here


-btw i sux at php and have like 5 books on it but nothing really sticks. anyone know video tutorials for it?
i used a video series for visual basic and became really good.

12-31-2005, 03:21 AM
you COULD create a script that just has a log (.txt file) for every image, and then write to the file everytime someone clicks, and then take the contents and echo the amount of contents back.

12-31-2005, 03:46 AM
or you could just go to the snippets section and grab the working example of link counting, requires no installation besides CHMODing the folder the script is in to 0777.

12-31-2005, 03:54 PM
If it's for a kind of link resporitory script then usually there will be a filed in the database to record the click count or there may be a different stat table giving the link ID and maybe an IP address or date/time.