Re: Download code
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sat, 08 Sep 2007 15:07:50 -0400
Shelly wrote:
"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> wrote in message news:W-ednUfe0eT3P3_bnZ2dnUVZ_tajnZ2d@xxxxxxxxxxxxxxSheldon Glickler wrote:I have a set of jpg files on a page. I want to give the user the option to downloadd all of them at once. What is the code to do that? It must exist because many times users are presented with a download button and there must be something behind it. Even if it is one file at a time, I can loop through the list. As for a name, I can use the current name and if it is one at a time, then the user can name each one.Of course you do know they can always download an image by right-clicking on the image and selecting "Save Image..." (or whatever wording their browser uses) option. No PHP required.
Alternatively, I could zip it up into one file and then have the download.
So, I have two questions:
1 - What is the code to download a file to the user's computer?
2 - How do I zip up a set of jpg files on the server?
Shelly
Of course I know that! However, most users are not overly computer literate and I would have to give them explicit instructions on what to do. A button saying "Download" is much easier on the SU. (stupid user). Also, I would like to have a button that says "Download All Pictures". For either of these I need code behind the button submit.
Shelly
I just put a note on the page as to what to do. Even the least-knowledgeable users can figure that out.
But you'll have to zip the image(s) to ensure they are downloaded. Otherwise the client browser may just display the image. You can't control that from the server end.
For building zip files, you can start with:
http://www.php.net/manual/en/ref.zip.php
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: Download code
- From: M. Katz
- Re: Download code
- References:
- Download code
- From: Sheldon Glickler
- Re: Download code
- From: Jerry Stuckle
- Re: Download code
- From: Shelly
- Download code
- Prev by Date: Re: fopen, where is the file placed ?
- Next by Date: Re: Is it possible to split class definition over two files?
- Previous by thread: Re: Download code
- Next by thread: Re: Download code
- Index(es):
Relevant Pages
|