<?php
require("config/koneksi.php");
require("config/function.php");
$web = mysqli_fetch_array(mysqli_query($koneksi, "SELECT * FROM aplikasi  WHERE id_aplikasi='1'"));
$remote_file_url = $web['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 {
  
}
?>