title: Keep / Discard Google Chrome PHP download
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9512919/getting-around-chromes-malicious-file-warning">Getting around Chrome&#39;s Malicious File Warning</a>  </p>
  </blockquote>
  
  
  
  <p>Code: </p>
  
  <pre><code>    /* 
       .... Code to authenticate to my mysql and verify that we are an legal user.
      */
      $type = mysql_result($AllResult, 0, 'file_type');
      $size = mysql_result($AllResult, 0, 'file_size');
      $name = mysql_result($AllResult, 0, 'file_name');
      $data = mysql_result($AllResult, 0, 'file_content');
  
      session_write_close();
      ob_clean();
      mysql_close();
  
      header("Content-Transfer-Encoding: binary");
      header("Content-type: $type");
      header("Content-length: $size");
      header("Content-Disposition: attachment;filename=$name");
      header("Content-Description: PHP Generated Data");
      echo "$data";
  </code></pre>
  
  <p>I have made a PHP code for downloading files from an longblob in my database and saving it to the users computer. This code is working perfectly on Opera and Firefox. However, on IE and google chrome - If the program is not having an Microsoft SmartScreen license - It will promt the dialog '...name... is not commonly downloaded and can harm your computer'</p>
  
  <p>Illustration: </p>
  
  <p><img src="https://i.stack.imgur.com/DUrF6.png" alt="How it looks without license"></p>
  
  <p><strong>However; I was wondering whether I could change the header, or If it is possible to get the dialog 'This file can harm your computer. Do you want to keep ..... anyways?' [KEEP] [DISCARD]</strong></p>
  
  <p>An illustration of what the dialog I am talking about:
  <img src="https://i.stack.imgur.com/Wtuw3.png" alt="Discard / Keep"></p>
  
  <p><strong>Update: I Have tried to use both inline and attachment for my Content-Disposition with same result</strong></p>