The actual zip functions allow you to read the contents of the zip file.
<?php
$zip = zip_open($zipfile);
while ($zip_entry = zip_read($zip))
{
zip_entry_open($zip, $zip_entry);
$name = zip_entry_name($zip_entry);
$handle = fopen($name, "w");
fwrite($handle, zip_entry_read($zip_entry, zip_entry_filesize($zip_entry)), zip_entry_filesize($zip_entry));
fclose($handle);
// use $name to insert in to database.
zip_entry_close($zip_entry);
}
zip_close($zip);
?>
Presuming you aren't after uploading a zip file with directories and you can add a directory before the fopen directory.