Re: Most viewed?
| From: | tedd | Date: | Tue, 15 Apr 2008 22:26:01 +0000 |
| Subject: | Re: Most viewed? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273016@lists.php.net to get a copy of this message | ||
At 10:41 AM -0500 4/15/08, Steve Marquez wrote:
Greetings, Can any of you point me in the right direction on how to use PHP to create a most viewed or most clicked articles list? Can it be done with PHP? Thank you so much, Steve Marquez smarquez@ccfortsmith.comSteve: There are a couple of ways to do this: 1) use mysql to record each download; 2) use a file to record each download. All you do is pass the user's click to a php script that records the transaction -- incrementing a counter in either mysql or a file and delivers the content to the user. You can include that number in your html to show how many transactions, if you want. This is an example of using a file: http://www.webbytedd.com/b/readwrite-download/ Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com