Advertisement
bhengh

SB Android fix 2: new code

Sep 12th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. else {
  2. $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
  3. $download_file_name = basename($url);
  4. if (stripos($user_agent, 'android') !== false) {
  5. $file_name_array = explode('.', $file_name);
  6. $last_key = count($file_name_array) - 1;
  7. $file_name_array[$last_key] = strtoupper($file_name_array[$last_key]);
  8. $download_file_name = implode('.', $file_name_array);
  9. }
  10. header('Content-Disposition: attachment; filename="'.$download_file_name.'"');
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement