Reply
Old January 16th, 2003 Top | #1
 
lieb39's Avatar
Apple lover, PC User
Joined: November 2002
Location: Australia
Posts: 526
Reputation: 0
Power: 118

Question Downloaded % times, how is it done?

Question,

I notice when a person posts a attachment, for example their desktop as a .jpg, you guys (ntfs) put a lil but of text under the link, saying Downloaded % times (% = amount of times downloaded) How do you do this, or if you can, what is your code?

Thanks

Did a post help you, or solve a problem you were having?
Click the button under the member's avatar to increase his/her reputation, and to encourage useful posts on the forum.
lieb39 is offline   Reply With Quote
Old January 16th, 2003 Top | #2

OSNN Folding Team  
Zedric's Avatar
NTFS Guru
Joined: January 2002
Location: Sweden
Posts: 4,006
Reputation: 890
Power: 171

Cool

Well it's like this. Each file is given an ID that is stored in the database. When you click the link it goes to a special download page (attachment.php in this case). This page checks the ID against the database, ticks off another download on a counter and redirects the browser to the acctual file.


Did I help you? Please use the reputation system. Click the icon on the left!
Proud host of the OSNN.net folding sigs. Want one? Check the folding thread!
http://zedric.no-ip.com/
Zedric is offline   Reply With Quote
Old January 21st, 2003 Top | #3
aswettla
 
aswettla's Avatar
Unregistered
Posts: n/a

Default

never new that. I just don't care about how the message board handels things
  Reply With Quote
Old January 22nd, 2003 Top | #4

OSNN Folding Team  
Zedric's Avatar
NTFS Guru
Joined: January 2002
Location: Sweden
Posts: 4,006
Reputation: 890
Power: 171

Cool

Originally posted by aswettla
never new that. I just don't care about how the message board handels things
That's kind of the point. Good programming is made so that the user doesn't have to think about what happens. He/she only clicks, types and posts so to speak.


Did I help you? Please use the reputation system. Click the icon on the left!
Proud host of the OSNN.net folding sigs. Want one? Check the folding thread!
http://zedric.no-ip.com/
Zedric is offline   Reply With Quote
Old January 26th, 2003 Top | #5
sailgreg
 
sailgreg's Avatar
Unregistered
Posts: n/a

Default

You can do this yourself with a text file, when you click the download link make it goto download.php?file={filename} have that PHP Script add +1 to the counter and then have it change the header to {filename} and it will all work nice
  Reply With Quote
Old January 28th, 2003 Top | #6

OSNN Folding Team  
Zedric's Avatar
NTFS Guru
Joined: January 2002
Location: Sweden
Posts: 4,006
Reputation: 890
Power: 171

Cool

Only problem is that many hosts (free anyway) deny access to the file system for security reasons. But on a paid or own server it'll work.


Did I help you? Please use the reputation system. Click the icon on the left!
Proud host of the OSNN.net folding sigs. Want one? Check the folding thread!
http://zedric.no-ip.com/
Zedric is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloaded New Program jelawman Windows Desktop Systems 6 January 19th, 2003 5:02am
ive downloaded sp1 but..... dabomb Windows Desktop Systems 7 September 21st, 2002 2:48pm
Downloaded new Ati driver yuk! ikester7579 Windows Desktop Systems 12 June 14th, 2002 10:03am
SkinStudio4.05 downloaded but no luck Cosmin Windows Desktop Systems 2 May 2nd, 2002 8:14pm
how much have u downloaded in a BloodLust DWS Windows Desktop Systems 9 December 25th, 2001 2:36pm