PHP – Unzip Large File


    $filename = 'c:\kosmas.zip';
        $archive = zip_open($filename);
        while($entry = zip_read($archive)){
            $size = zip_entry_filesize($entry);
            $name = zip_entry_name($entry);
            $unzipped = fopen('c:/unzip/'.$name,'wb');
            while($size > 0){
                $chunkSize = ($size > 10240) ? 10240 : $size;
                $size -= $chunkSize;
                $chunk = zip_entry_read($entry, $chunkSize);
                if($chunk !== false) fwrite($unzipped, $chunk);
            }

            fclose($unzipped);
        }


source:
http://stackoverflow.com/questions/3263129/unzipping-larger-files-with-php

Unzip dengan PHP


dapet dari http://www.webhostingtalk.com/archive/index.php/t-277530.html

you can unzip a password protected file with PHP in Unix….(I haven’t tested it in Windows..or any other platform)…run the following system command….

system(“`which unzip` -P Password $pathtozipfle -d $destinationdir”,$ret_val)….

if everything runs properly you will get back 0 for $ret_val..which means complete success.(info-zip.org)