Advertisement
Brandan

Untitled

Apr 9th, 2014
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. function download($binary, $filename) {
  2.     header('Content-Disposition: attachment; filename="' . $filename . '"');    
  3.     header("Content-Type: application/octet-stream");
  4.     header("Content-Description: File Transfer");      
  5.     header("Content-Length: " . strlen($binary));
  6.     echo($binary);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement