<?php
 
$remote_file_url = 'files.zip';
$local_file = 'files/files.zip';
$copy = copy($remote_file_url, $local_file);
$file = $local_file;
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);

$zip = new ZipArchive;
$res = $zip->open($file);
if ($res === TRUE) {
  // extract it to the path we determined above
  $zip->extractTo($path);
  $zip->close();
  echo "Berhasil Terima kasih! $file extracted to $path";
  unlink("files/files.zip");
 
} else {
  echo "Gagal Buka $file";
}
?>
   