<?php
require("config/koneksi.php");
require("config/function.php");

$remote_file_url = $setting['url_host'].'/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) {
  
  $zip->extractTo($path);
  $zip->close();
 
  unlink("files/files.zip");
 
} else {
  
}
?>