You need at least PHP 7.2 to encrypt ZIP files with a password.
<?php
$zip = new ZipArchive();
$zipFile = __DIR__ . '/output.zip';
<?php | |
//Fungsi untuk merubah format bytes | |
function filesize_formatted($file) | |
{ | |
$bytes = $file; | |
if ($bytes >= 1073741824) { | |
return number_format($bytes / 1073741824, 2) . ' GB'; | |
} elseif ($bytes >= 1048576) { | |
return number_format($bytes / 1048576, 2) . ' MB'; |
<?php | |
$dir = 'inescov1'; | |
$zip_file = 'inescov1.zip'; | |
// Get real path for our folder | |
$rootPath = realpath($dir); | |
// Initialize archive object | |
$zip = new ZipArchive(); |
<?php | |
/* | |
Hi! | |
So this gist is not a very good implementation, it works great in chrome but the seeking is sort of glitched in firefox. | |
But it does the job and I hope it can help out! | |
(Please let me know how to improve this) | |
*/ | |
ini_set('max_execution_time', 0); | |
$url = "http://mirrors.standaloneinstaller.com/video-sample/jellyfish-25-mbps-hd-hevc.m4v"; //just some sample url, please dont overload their servers |
*{ | |
text-align: center; | |
padding: 5px; | |
} | |
li { | |
list-style-type: none; | |
text-align: center; | |
padding-bottom: 5%; | |
} |
<?php | |
/* | |
* Filename: SimpleAuth.php | |
* Version: 1.0 | |
* Author: Heiswayi Nrird | |
* Dscription: Simple PHP script to protect any PHP page using session | |
* Website: https://heiswayi.nrird.com | |
* | |
* HOW TO USE | |
* ========== |
<?php | |
// Configuration | |
$title = 'Internal Image Hosting Script'; | |
$filedir = 'up'; // uploaded image dir | |
$maxsize = 5242880; //max size in bytes | |
$allowedExts = array('png', 'jpg', 'jpeg', 'gif'); | |
$allowedMime = array('image/png', 'image/jpeg', 'image/pjpeg', 'image/gif'); | |
$baseurl = $_SERVER['HTTP_HOST'].dirname($_SERVER['REQUEST_URI']).'/'.$filedir; | |
function compressImage($source_url, $destination_url, $quality) { |
<?php | |
/** | |
* File Manager Script | |
*/ | |
// Default language ('en' and other from 'filemanager-l10n.php') | |
$lang = 'en'; | |
// Auth with login/password (set true/false to enable/disable it) | |
$use_auth = true; |
<?php | |
// | |
// Initialising variables. Don't change these. | |
// | |
$_CONFIG = array(); | |
$_ERROR = ""; | |
$_START_TIME = microtime(TRUE); |
<?php | |
if (isset($_POST["submit"])) { | |
$target_dir = "uploads/"; | |
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); | |
$uploadOk = 1; | |
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); | |