I have devolped a blog with php . now i have saved that blog content in a php file
now how to know how many views are there for that php file and also basically what is exactly meant by view and how to rate that blog using php
How to get the number of views for a topic in a blog
Moderator: General Moderators
-
syamswaroop
- Forum Newbie
- Posts: 19
- Joined: Fri May 01, 2009 1:31 am
Re: How to get the number of views for a topic in a blog
You could have a field called `Counter` or something for each entry in the database. You could then increment the counter each time someone visits that entry.
You might also want to set a cookie that expires in 10 minutes or something, and only update if that cookie doesn't exist though, because someone could just hold down f5 and completely invalidate your stats.
You might also want to set a cookie that expires in 10 minutes or something, and only update if that cookie doesn't exist though, because someone could just hold down f5 and completely invalidate your stats.
-
syamswaroop
- Forum Newbie
- Posts: 19
- Joined: Fri May 01, 2009 1:31 am
Re: How to get the number of views for a topic in a blog
Thank you very much