open($file, ZipArchive::CREATE + ZipArchive::EXCL + ZipArchive::CHECKCONS) or die("Failed to create {$file}.\n"); return $zip; } $build = createZip("Universal Bypass.zip"); $firefox = createZip("Universal Bypass for Firefox.zip"); foreach($index as $fn) { if($fn == "README.md") { continue; } if($fn == "manifest.json") { $json = json_decode(file_get_contents($fn), true); $json["incognito"] = "split"; $build->addFromString($fn, json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); } else { $build->addFile($fn, $fn); } $firefox->addFile($fn, $fn); } $build->close(); $firefox->close();