PDA

View Full Version : Number of Views [PHP]



thesleuth
September 9th, 2006, 03:49 AM
I have some articles on my webpage and I would like to put how many number of views an article has. (Not every refresh, but every ip that visits that article and has no cookies which says that that user visited that article before) I also want the info to be stored in my site's database (mySQL)

Does anyone has tutorial or script page for that? Any suggestions will be greatly appreciated. Thanks in advance.

Seb Hughes
September 9th, 2006, 07:38 AM
What you have to do first is set up a database/table. When a person views an article that runs a query to check if there ip is in the database and if not put it in.

If i got time later ill post a quick example.

Digitalosophy
September 10th, 2006, 04:24 AM
http://inobscuro.com/tutorials/read/30/
http://www.hscripts.com/scripts/php/visitorsOnline.php

thesleuth
September 10th, 2006, 04:59 AM
Thanks :)