SHARE
TWEET

Untitled

a guest Jun 18th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4.     header('Content-Description: File Transfer');
  5.     header("Content-Type: application/zip");
  6.     header("Content-Transfer-Encoding: Binary");
  7.     header('Content-Disposition: attachment; filename="name.zip"');
  8.     header('Expires: 0');
  9.     header('Cache-Control: must-revalidate');
  10.     header('Pragma: public');
  11.    
  12.  
  13.  
  14.  
  15. $ua = $_SERVER['HTTP_USER_AGENT'] . "\n\n";
  16. if (strpos($ua, 'Macintosh') ==!false) {
  17.  
  18.     header('Content-Length: ' . filesize('1.zip'));
  19.     readfile('1.zip');
  20.  // mac
  21.  
  22.  
  23.  } else {
  24.      
  25.      
  26.      // other
  27.      
  28.      header('Content-Length: ' . filesize('2.zip'));
  29.     readfile('2.zip');
  30.    
  31.      
  32. } ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top