homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Producing "Most read articles" section
The Cricketer

 2:37 pm on Aug 10, 2006 (gmt 0)

I'm thinking of producing a "Most Read Articles" facility on my website with PHP/Mysql. What's the best way to do this? just update a field in my database each time a user accesses the page?



 3:10 pm on Aug 10, 2006 (gmt 0)

Maybe you could create a table that's keyed by article ID and a second field is a count of the number of times an article has been read by a browser.

You would probably want to eliminate spiders from this. A handy way to do this would be to have the count incremented by an "image call", where you have an img tag on your page that actually calls a cgi script with a parameter of the article ID, and the script would then increment the counter for that article.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved