SHARE
TWEET

SB Android fix 2: new code

bhengh Sep 12th, 2013 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.                         }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top