title: download gzip file via php cURL
body: <p>I want to download file and save it.
  I am using this code for downloading gzip file.</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $this-&gt;_params['url']);
  curl_setopt($ch, CURLOPT_VERBOSE, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible;)");
  curl_setopt($ch, CURLOPT_POST, true);
  $post = array("image_id"=&gt;  $this-&gt;_response_id, "format"=&gt;$this-&gt;_response_format);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 
  $response = curl_exec($ch);
  curl_close($ch);
  </code></pre>
  
  <p>But when I print type of result I am seeing string(i get  file with string format).</p>
  
  <p>How can a resolve this problem?</p>
  
  <p>Thank's</p>