title: how to zip stream csv file php
body: <p>I created an .csv export file with code:</p>
  
  <pre><code>header('Content-type: text.csv');
  header('Content-Disposition: attachment; filename=filename.csv');
  .....
  $fp = fopen('php://output','w');
  foreach ($rowsCsv as $rowCsv) {
      fwrite($fp, $rowCsv);
  }
  fclose($fp);
  </code></pre>
  
  <p>It work ok but I want to compress the csv file to zip file and download it. How do it</p>