Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Description: File Transfer');
- header("Content-Type: application/zip");
- header("Content-Transfer-Encoding: Binary");
- header('Content-Disposition: attachment; filename="name.zip"');
- header('Expires: 0');
- header('Cache-Control: must-revalidate');
- header('Pragma: public');
- $ua = $_SERVER['HTTP_USER_AGENT'] . "\n\n";
- if (strpos($ua, 'Macintosh') ==!false) {
- header('Content-Length: ' . filesize('1.zip'));
- readfile('1.zip');
- // mac
- } else {
- // other
- header('Content-Length: ' . filesize('2.zip'));
- readfile('2.zip');
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement