Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to count the number of times a link is visited

    hi,


    how i can get the total number of times a particular link has been visited.for example:this is the link.
    www.abcd.com/upload.php?id=761786717.jpg.

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


    thanks
    mrjameer

  • #2
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •