Page 1 of 1

writing a zip resource to disk as a file

Posted: Fri Jul 28, 2006 9:35 am
by twrofpwr
Hey guys, how do you write a zip resource to disk opened with zip_open / zip_read... I'm not quite sure how this works thanks for any help

Jeff

Posted: Fri Jul 28, 2006 10:47 am
by RobertGonzalez
Zip as in compressed files? Please give a little more information.

Posted: Fri Jul 28, 2006 3:50 pm
by twrofpwr
hey guys I actually figured out how to do what I need to do... Sorry I should do a bit more research before posting up here, it just took me 15 mins or so to find out what I needed to do.. Baiscaly I just had to get the entire contents of the file with $buf = zip_entry_read($zip_file, zip_entry_filesize($zip_file)); and then use fwrite(....)

Ask the bear.. :P (a guy I worked with had a proff that had a stuffed bear outside his office.. he would make you ask it your question before ever talking to you :P

Posted: Fri Jul 28, 2006 8:19 pm
by RobertGonzalez
A stuffed bear... I like it. Besides, it's not like we don't ask you to do a little research :wink: ...

/me invisions picture of a Caveman mod in a restaurant...