[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to download multiple files (PHP 4)

Posted on 2007-10-08
10
Medium Priority
?
2,977 Views
Last Modified: 2013-12-20
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.
0
Comment
Question by:orik7
  • 5
  • 5
10 Comments
 
LVL 16

Accepted Solution

by:
Kiran Paul VJ earned 1000 total points
ID: 20038706
0
 

Author Comment

by:orik7
ID: 20045523
thanx. taking a look. we'll be in touch.
0
 

Author Comment

by:orik7
ID: 20054342
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 20054384
hi orik7,
did u install the PEAR library
0
 

Author Comment

by:orik7
ID: 20055881
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
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 20056463
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
 

Author Comment

by:orik7
ID: 20059079
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
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 20059288
download it and unrar it
0
 
LVL 16

Expert Comment

by:Kiran Paul VJ
ID: 20059448
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
 

Author Comment

by:orik7
ID: 20064556
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
This holiday season, we’re giving away the gift of knowledge—tech knowledge, that is. Keep reading to see what hacks, tips, and trends we have wrapped and waiting for you under the tree.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question