View Full Version : how to count the number of times a link is visited

03-31-2007, 04:09 PM

how i can get the total number of times a particular link has been visited.for example:this is the link.

i want to display how many times this link has been visited


03-31-2007, 05:35 PM
Setup a counter in your upload.php page. If you pulling that image from the database, then just update that row +1 by id each time its viewed. Downside is you can refresh to your hearts content and it will keep counting. Fixes for that would be setting a cookie name="image" and put all the id's in an array for what was visited then serialize it. Then before you update your counter check for that cookie... Or use sessions and apply the same method. This is only if you care about the refreshing.