Welcome Guest, Not a member yet? Register   Sign In
Unzipping a file created by Zip library
#2

[eluser]taewoo[/eluser]
I tried it with CURL. This doesn't work either

Code:
$out_handle = fopen($local_file, "wb");
    
    $ch = curl_init();
//curl_setopt ($ch, CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FILE, $out_handle);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
$page = curl_exec($ch);
if (!$page) {
    echo "<br />cURL error number:" .curl_errno($ch);
    echo "<br />cURL error:" . curl_error($ch);
    exit;
}
curl_close($ch);

but the error is slightly different
Code:
Archive:  data.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
note:  data.zip may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of data.zip or
        data.zip.zip, and cannot find data.zip.ZIP, period.


Messages In This Thread
Unzipping a file created by Zip library - by El Forum - 11-17-2009, 01:28 AM
Unzipping a file created by Zip library - by El Forum - 11-17-2009, 03:09 AM
Unzipping a file created by Zip library - by El Forum - 11-17-2009, 02:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB