SHARE
TWEET

SB Android fix 1: new code

bhengh Sep 12th, 2013 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                         $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
  2.                         $download_file_name = $file_name;
  3.                         if (stripos($user_agent, 'android') !== false) {
  4.                                 $file_name_array = explode('.', $file_name);
  5.                                 $last_key = count($file_name_array) - 1;
  6.                                 $file_name_array[$last_key] = strtoupper($file_name_array[$last_key]);
  7.                                 $download_file_name = implode('.', $file_name_array);
  8.                         }
  9.                         header('Content-Disposition: attachment; filename="'.$download_file_name.'"');
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