Jump to content

[SOLVED] is it possible to create a zip in php?


ag3nt42

Recommended Posts

Hello all,

 

Just wondering if its possible to create a .zip file in php..

 

Like say I have a list of 5 files.. that I want to give to a user to download..

 

He chooses 3 of those files..

 

How could I then "Zip" those files up so I can serve up the download?

 

thanks for your responses,

 

~ag3nt42

Link to comment
Share on other sites

PHP has a built-in ZipArchive class. Look it up.

 

omg dude don't respond to me anymore if your gona say stupid crap like that.. I DID look it up smartarse

 

 

if you READ the page you might see that it says nothing about CREATING a zip does it

 

@revraz and vicodin -

Thanks for you responses they were helpful tho I did read the page at w3 vic

Link to comment
Share on other sites

PHP has a built-in ZipArchive class.  Look it up.

 

omg dude don't respond to me anymore if your gona say stupid crap like that.. I DID look it up smartarse

 

What the hell are you talking about?  You're being a real prick.  I told you to look up ZipArchive to know how it works, not to look up whether or not PHP can write Zips.  We're all trying to help you and you're being a jerk.  Quit it.  Really.

Link to comment
Share on other sites

PHP has a built-in ZipArchive class.  Look it up.

 

omg dude don't respond to me anymore if your gona say stupid crap like that.. I DID look it up smartarse

 

 

if you READ the page you might see that it says nothing about CREATING a zip does it

 

That's no way to treat someone who's going out of their way to help you.

 

The ZipArchive class is capable of creating and streaming zip files.

Link to comment
Share on other sites

everyone else that helps me I thank because they don't sit there and say things the way dark does.. and I'm tired of his respones..

 

everything he says to me, he says with some notion that I'm retarded and never research things before I ask questions.

 

personaly I think i'll be better off he just doesn't respond to my posts.

 

@discomatt

I have no reason to be upset with you but this has nothing to do with you..

 

 

if he was to just say:

PHP has a built-in ZipArchive class.

 

thats fine.. I have no problems

 

but when he adds the smartarsed "Look it up." that to me implies he thinks i'm too stupid to figure out I should "Look Stuff up" before I post.

 

and that is being a "Jerk" in his words

Link to comment
Share on other sites

everyone else that helps me I thank because they don't sit there and say things the way dark does.. and I'm tired of his respones..

 

everything he says to me, he says with some notion that I'm retarded and never research things before I ask questions.

 

personaly I think i'll be better off he just doesn't respond to my posts.

 

@discomatt

I have no reason to be upset with you but this has nothing to do with you..

 

I'm not mean or condescending at all, so I have no idea what you're talking about.  Telling you to research ZipArchive is not saying that you're retarded.

Link to comment
Share on other sites

everyone else that helps me I thank because they don't sit there and say things the way dark does.. and I'm tired of his respones..

 

everything he says to me, he says with some notion that I'm retarded and never research things before I ask questions.

 

personaly I think i'll be better off he just doesn't respond to my posts.

 

@discomatt

I have no reason to be upset with you but this has nothing to do with you..

 

 

if he was to just say:

PHP has a built-in ZipArchive class.

 

thats fine.. I have no problems

 

but when he adds the smartarsed "Look it up." that to me implies he thinks i'm too stupid to figure out I should "Look Stuff up" before I post.

 

and that is being a "Jerk" in his words

 

Well, then keep it to PM please.

 

The way you worded your question, a simple 'yes' would have been sufficient.

 

Your further request on 'how' ->

 

http://www.google.com/search?q=zip+files+with+php

 

Returns relevant tutorials first the first 20 results. This leads me to believe you didn't 'look before you ask.'

 

Please keep your flame wars to PM. If you don't want my opinion, don't post publicly.

Link to comment
Share on other sites

Well, then keep it to PM please.

 

The way you worded your question, a simple 'yes' would have been sufficient.

 

Your further request on 'how' ->

 

http://www.google.com/search?q=zip+files+with+php

 

Returns relevant tutorials first the first 20 results. This leads me to believe you didn't 'look before you ask.'

 

Please keep your flame wars to PM. If you don't want my opinion, don't post publicly.

 

Well said.  And just a little tip:  Send me any flames via PM or try to argue with me over nothing, and I'll report you.  I'm not interested in bothering with you over PM.  I try to help you and you're like "I DID look it up smartarse".  Are you kidding me?

Link to comment
Share on other sites

wtf ever.. i'm not coming here anymore if this is how its gona be.. I've done nothing but be nice to ppl

and this arse dark comes and starts being a prick to me and all of sudden i'm the bad guy..

 

w/e

 

 

No one's being a prick here except you.  Plenty of people say "Go look xxxx up" if they think that further research would be helpful, and they're not pricks, right?  Just me?  :D That's "special".

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.