Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,816 members, 7,806,291 topics. Date: Tuesday, 23 April 2024 at 02:09 PM

Download A File - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Download A File (1036 Views)

How To Download A Website And Redesign It / How To Download A Youtube Video On Your PC Or Phones. / Where Can I Download A Free Mobile Website Template (2) (3) (4)

(1) (Reply) (Go Down)

Download A File by Nobody: 2:59pm On Aug 16, 2009
dear webmaster i got 2 questions

1 am building a game site for downloading and i want a count download on a file clicked before it can be downloaded
2 do i save the downloaded files in a folder or database

hope 2 read ur replys
Re: Download A File by Nobody: 5:00am On Aug 17, 2009
i have a free script i developed that you can use. Besides there are lots of them scripts all over the web.
I think the problem is that, you dont know how to set it up iight?
Re: Download A File by Nobody: 7:07am On Aug 21, 2009
I found a java script already it works
How download files do i save them in a database or folder
Re: Download A File by Cactus(m): 7:27am On Aug 21, 2009
save the files in a secured folder and save the links to the folder in the db.

you can also include a script that masks the url and generates a random number of characters to replace the url, eg

instead of = http://www.mysite.com/foldname/filetodownload.zip

then you will have = http://www.mysite.com/i4m1337fml
Re: Download A File by kehers(m): 2:01am On Aug 22, 2009
Q 1. To achieve this you will need to create a download processor script - I mean a script that handles the content, does the counting (probably by incremementing a count field stored in a db with the filename or file id as key) and sending the content to the user. This is coz normal linking to the file like this: http://mysite.com/file.ext wont work for d count.
A simple analogy to the download processor script (in PHP) is this:

//mysite.com/download.php?fileid=someID
//Get the original file, mime type and source from where-ever its stored (db for ex) using fileid GET field
if (is_file($path_to_content)) {
header("Content-Type: ".$mime_type);
header("Content-Length: ".filesize($path_to_content));
readfile($path_to_content);
//Do your count here by setting the db count field for this file to + 1
}
else {
// some error,
}
By the way, why do u want to count before downloading? Why not after? If you also have an intermediate knowledge of PHP (and you are scripting wit it), check out the PEAR Package: HTTP_Download (http://pear.php.net/package/HTTP_Download)
Q 2. Save in a secured folder (as suggested by Cactus as well). DB storage is more resource consuming.
Re: Download A File by Nobody: 10:32am On Aug 22, 2009
That pear package may be difficult for you to use if you are not used to php pear. But, though i wrote a script earlier on that processes download, masking and counting on my website - www.mwebng.net - but due to some minor bugs, i used http://www.zubrag.com/scripts/download.php
and later pimped it, but try it out first and if u have any bug, let me know
Re: Download A File by Nobody: 3:06pm On Aug 22, 2009
kehers:

Q 1. To achieve this you will need to create a download processor script - I mean a script that handles the content, does the counting (probably by incremementing a count field stored in a db with the filename or file id as key) and sending the content to the user. This is coz normal linking to the file like this: http://mysite.com/file.ext wont work for d count.
A simple analogy to the download processor script (in PHP) is this:By the way, why do u want to count before downloading? Why not after? If you also have an intermediate knowledge of PHP (and you are scripting wit it), check out the PEAR Package: HTTP_Download (http://pear.php.net/package/HTTP_Download)
Q 2. Save in a secured folder (as suggested by Cactus as well). DB storage is more resource consuming.


wink wink wink wink wink wink wink wink wasere men!
@kehers, aside php, what other language do you use?
Re: Download A File by kehers(m): 1:26am On Aug 23, 2009
@webdezzi
I use PHP solely for server side web development. I do J2ME for mobile development though.
Re: Download A File by Nobody: 5:10pm On Aug 23, 2009
Can u drop it number pls
Re: Download A File by Nobody: 7:26pm On Aug 23, 2009
i was tryin to learn that j2me one time like that, but mehn, i had to escape! i suspect i was not exposed to oop then.
Re: Download A File by Nobody: 6:39am On Aug 25, 2009
Ok thanks 4 d reply thats d last of my agenda on my list d saving of files will check it out on web thanks
Re: Download A File by kehers(m): 1:00pm On Aug 25, 2009
@webdezzi
Sorry for d late reply. Here: 08066887840
Re: Download A File by Nobody: 2:19pm On Aug 26, 2009
thanks for the reply i cant seem to find a toturial on linking file path to database
you said save files to folder and file path to database i need a little help on dat
thanks
Re: Download A File by Nobody: 6:58pm On Aug 30, 2014
webdezzi: Can u drop it number pls
Webdezzi was like a toddler back then, just starting to walk.
Re: Download A File by Nobody: 11:59pm On Aug 30, 2014
donjayzi:
Webdezzi was like a toddler back then, just starting to walk.

we needed programmers to collaborate with then.
we were getting loads of coders who coulsn't deliver.

follow my earliest posts
Re: Download A File by dhtml(m): 8:50am On Aug 31, 2014
Interesting. .
Re: Download A File by Tval(m): 9:30am On Aug 31, 2014
dhtml: Interesting. .

I like your website.
Re: Download A File by dhtml(m): 11:22am On Aug 31, 2014
Tval:

I like your website.
Thank you very much, i appreciate that.

(1) (Reply)

Which One Of You Webmasters Made This Site - Http://www.buddyjoint.com/ / I Need Help Concerning A Website Forum / As Nairaland Blog Tutorial Helped Me.. Review My Blog Please.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 29
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.