How to download multiple files (PHP 4)

Hello.
i making my personal web album page.
it already got 7,000+ photos.
i'm going to add a download option for registred usres.
i'm expeting that user will try to download 1-120  JPEG photos when the oppartnity comes.
so,
for this perpuse i know only of the way of ZIPPING the contant and downloading it as a single file. i used to have server problems using that from time to time.
is there any other way for that?
is there any prooved way to use zipping? (for this many files- contant changes rapidly)
thanx. ori.
orik7Asked:
Who is Participating?
 
Kiran Paul VJComputer EngineerCommented:
0
 
orik7Author Commented:
thanx. taking a look. we'll be in touch.
0
 
orik7Author Commented:
Hello.
i been looking at this yesterday and it looks saficiant and easy to use for me but .. i can't get it to trat working :
getting the error - Fatal error: Cannot instantiate non-existent class: archive_zip in /home/op/public_html/album/extra/zip-test.php on line 5

which is the first row after the include row.
the included file is inculded fine. i've tryed to use differnt dirotorys names/location but no luck.
and still i belive (judging my history) that i got the files hirarcy wrong.
have you tested it your self?
thanx. ori.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Kiran Paul VJComputer EngineerCommented:
hi orik7,
did u install the PEAR library
0
 
orik7Author Commented:
hi. no i did not. but i understood that i can use the php file mentioned there. i've downloeded it. it was named 'PEAR.php' and i changed i to 'archive_zip.php' to mtach the included reqsted file name on exsample script.
thank-you. ori.
0
 
Kiran Paul VJComputer EngineerCommented:
maybe some problem.

do this
keep the original PEAR.php file and download this http://pear.php.net/package/Archive_Zip/download

it will contain a file called Zip.php, keep PEAR.php and Zip.php in a pear folder and use
include ('pear/Zip.php'); instead of include ('pear/archive_zip.php');
and try again.
0
 
orik7Author Commented:
kiranvj, hello.
there was not a 'Zip.php' file on your last link. there only one file i think pear file, named : Archive_Zip-0.1.1 which is the same as first link you gave earlier.
ori.
0
 
Kiran Paul VJComputer EngineerCommented:
download it and unrar it
0
 
Kiran Paul VJComputer EngineerCommented:
hi ori,

download and check this https://filedb.experts-exchange.com/incoming/ee-stuff/4989-zip.zip

I created a zip using a text file and 3 jpg files.
Works like a charm. I tested and uploaded it.

kiranvj
0
 
orik7Author Commented:
HI. i wanted to update about my expriance with that script/lybary.
 so it worked great for me after all.
i had a problem that the downladed files came as the path i gave. meaning ' giving a full path to the photo (/home/user/../) will output the full path and the photo/s will be as they are on that tree.
this "problem" can be very usefull for some needs. as if you belive that the user will need a reference back to where (which folder) the photo where thaken from. i would also welcome this but i was afraid that it will make more bad than good for my avarge user.
in the end i did not used it and used a one called  'PHPZip v1.2 by Sext (sext@neud.net) 2002-11-18'  while there is a much newer version (1.6+) out there i used this one simply becuase i knew it from my past (and had it on my hard drive).
thanx a lot . ori.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.