ag3nt42 Posted August 11, 2008 Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/ Share on other sites More sharing options...
revraz Posted August 11, 2008 Share Posted August 11, 2008 Like this? http://www.phpconcept.net/pclzip/man/en/index.php Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613844 Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 PHP has a built-in ZipArchive class. Look it up. Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613848 Share on other sites More sharing options...
vicodin Posted August 11, 2008 Share Posted August 11, 2008 This may help too. http://www.w3schools.com/php/php_ref_zip.asp Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613851 Share on other sites More sharing options...
ag3nt42 Posted August 11, 2008 Author Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613942 Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613948 Share on other sites More sharing options...
discomatt Posted August 11, 2008 Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613949 Share on other sites More sharing options...
ag3nt42 Posted August 11, 2008 Author Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613952 Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613959 Share on other sites More sharing options...
discomatt Posted August 11, 2008 Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613962 Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 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 https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613965 Share on other sites More sharing options...
ag3nt42 Posted August 11, 2008 Author Share Posted August 11, 2008 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 Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613969 Share on other sites More sharing options...
ag3nt42 Posted August 11, 2008 Author Share Posted August 11, 2008 thanks again rev Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613974 Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 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? That's "special". Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613976 Share on other sites More sharing options...
ag3nt42 Posted August 11, 2008 Author Share Posted August 11, 2008 EDITED BY akitchin: cleaned up the for the children viewing. watch your language, lest you be banned. thread locked for language and pointlessness. Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613977 Share on other sites More sharing options...
Daniel0 Posted August 11, 2008 Share Posted August 11, 2008 Right. Knock it off people. Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613978 Share on other sites More sharing options...
DarkWater Posted August 11, 2008 Share Posted August 11, 2008 Thanks, akitchin. =/ Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613988 Share on other sites More sharing options...
akitchin Posted August 11, 2008 Share Posted August 11, 2008 a stiff upper lip for all on the internet is the best course of action. Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-613993 Share on other sites More sharing options...
ag3nt42 Posted August 12, 2008 Author Share Posted August 12, 2008 yea, Thanks, akitchin. =/ Link to comment https://forums.phpfreaks.com/topic/119191-solved-is-it-possible-to-create-a-zip-in-php/#findComment-614660 Share on other sites More sharing options...
Recommended Posts