Re: Most viewed?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 If you want to take it a step further and only record a *click* if a person
hasn't clicked this article before, you have several options. You can save a
cookie on their computer saying they've clicked that article - of course
they can delete the cookie, which may skew the count. Or you can save their
IP address in a database (or file, if you want to choose that method) - only
increment if that IP address hasn't clicked that article before. And of
course, it's also very possible that their IP address can change. However,
it should work pretty well.

Or they could share an IP with a few hundred other people so that all
of them combined only get counted one time.

Because of this if it's not too important (eg it's just ratings of articles) personally I would choose the cookie method. If it's uber important you could have the user login before they can rate stuff.

--
Richard Heyes

+-----------------------------------------+
|Access SSH through a Windows mapped drive|
|    http://www.phpguru.org/sftpdrive     |
+-----------------------------------------+

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux