Welcome to WebmasterWorld Guest from 54.158.54.179

Forum Moderators: open

Message Too Old, No Replies

Producing "Most read articles" section

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

10+ Year Member



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)

WebmasterWorld Senior Member 10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month