[solved] downloading

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zoe
Forum Commoner
Posts: 36
Joined: Sat Jun 11, 2005 11:51 am
Location: Glasgow

[solved] downloading

Post by zoe »

I'm sure this is a pitifully simple problem, but I'm not sure where to look to find the solution.
All I want to do is allow users to download files from my site without right clicking a link and saving the target. If possible I'd like to be able to retrieve files direct from the server, rather than via a database. Is there a simple way of achieving this?
Last edited by zoe on Sun Sep 18, 2005 4:58 am, edited 1 time in total.
User avatar
Trenchant
Forum Contributor
Posts: 291
Joined: Mon Nov 29, 2004 6:04 pm
Location: Web Dummy IS

Post by Trenchant »

ZIP or EXE files.

if you want someone to automatically go to this group of files and download them all at once then simply zip them up and save them on your server. When a user goes to that address it will automatically start downloading.

Another alternative is specifying what file you want them to download in the header file.
NilsK
Forum Newbie
Posts: 3
Joined: Sat Aug 13, 2005 5:45 am
Location: Norway

Post by NilsK »

You could also use tar and bz files.
Any archive file will work with this...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

zip files are often the better solution since most machines intrinsicly know how to unpack them these days.. tar/gz is mostly tied to unix based systems, exe will only work for windows and is more of a security/virus issue...
zoe
Forum Commoner
Posts: 36
Joined: Sat Jun 11, 2005 11:51 am
Location: Glasgow

Post by zoe »

Thanks very much everyone who replied. I ended up following a tutorial and building an elaborate script to upload, download, view, delete, everything. I'll know next time.
Post Reply