homepage Welcome to WebmasterWorld Guest from 54.166.95.146
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
display most popular files
szkoda




msg:3604523
 9:30 pm on Mar 18, 2008 (gmt 0)

I run a website dedicated to game demos (amongst other things) and just wanted to know how would I go about displaying something on my homepage that would show the most popular demo downloads?

 

Receptional Andy




msg:3604539
 9:54 pm on Mar 18, 2008 (gmt 0)

First you need to log the number of times people download a game. Then, sort and display the collected data.

If you ask a more specific question, I'll do my best to give you a more specific answer ;)

szkoda




msg:3604567
 10:34 pm on Mar 18, 2008 (gmt 0)

all i want is a 'most popular downloads' box that is on my home page which auto updates itself with relevent information -

so how do i:
1. log the information
2. sort the info
3. display it on the page

Receptional Andy




msg:3605327
 3:06 pm on Mar 19, 2008 (gmt 0)

1. log the information: You need a database of some kind, be that SQL or simple text files. Most people would likely opt for mySQL. Instead of linking directly to the files to download, you link through a script which logs the count in the database, and delivers the file.

2. sort the info: You then need to query your database using a programming language like ASP or PHP.

3. display it on the page: output the data using your programming language of choice.

This is a relatively straightforward tasks if you're familiar with a programming language.

So, if you were to opt for PHP/mySQL:

- Create a database for storing the name of the download and the count
- When a file is downloaded, use a script to add one to the count in the database and then redirect to the file
- Use PHP to retrieve the downloads with the highest count, and output this info to the page.

If you want to learn how to use programming languages/databases, this would be a good exercise to start with since it's not totally easy, but isn't onerously difficult either.

The alternative is to just search Google or wherever for 'download counter' and use a pre-made solution. You'd just need to take care not to pick one that was badly written, and you'll obviously still need to install/configure it.

Your choice will be restricted by what technology is available on your site.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
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