Ok I have been able to open the file (.zip) with this code:
if ($zip) {
while ($zip_entry = zip_read($zip)) {
echo "Name: " . zip_entry_name($zip_entry) . "\n<Br>";
echo "Actual Filesize: " . zip_entry_filesize($zip_entry) . "\n<br>";
echo "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "\n<br>";
echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n<br>";
if (zip_entry_open($zip, $zip_entry, "r")) {
echo "File Contents:\n";
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
echo "$buf\n";
zip_entry_close($zip_entry);
}
echo "\n";
}
zip_close($zip);
}
This just spits my CSV file that is inside the ZIP out, or stores it in one big ass string.
What I need though is to break each line of the CSV up to then INSERT it into my DB.
I dont have the convenience of using shell to extract the file. Too bad I know.
So anyone know what to do from this point?
Thanks.