You need at least PHP 7.2 to encrypt ZIP files with a password.
<?php
$zip = new ZipArchive();
$zipFile = __DIR__ . '/output.zip';| <?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 | |
| /*提取Bing网站的信息*/ | |
| $str=file_get_contents('https://www.bing.com/HPImageArchive.aspx?idx=0&n=1'); | |
| /*匹配字符串中的url超链接,成功返回 1 ,否则返回 0 */ | |
| if(preg_match("/<url>(.+?)<\/url>/ies",$str,$matches)){ | |
| $imgurl='http://www.bing.com'.$matches[1]; | |
| } | |
| if($imgurl){ | |
| /*用于发送原生的 HTTP 头,提示输出图片*/ | |
| header('Content-Type: image/JPEG'); |
| <?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); |