title: Unable to download remote image with PHP CURL
body: <p>Edit: I contact the support at scrapestack and confirmed that their api doesn't support image files.</p>
  
  <p>I am trying to download a remote image using CURL with php. Below is my code. But whenever I try to open the downloaded image, I always get:</p>
  
  <pre><code>Cannot read this file. This is not a valid bitmap file, or its format is not currently supported.
  </code></pre>
  
  <p>Anyone know what is wrong with my code? Thank you.</p>
  
  <pre><code>$image ="http://api.scrapestack.com/scrape?access_key=TOKEN-HERE&amp;url=https://i.imgur.com/Cbiu8Ef.png";
  $imageName = pathinfo( $image, PATHINFO_BASENAME );
  $ch = curl_init();
  curl_setopt( $ch, CURLOPT_URL, $image );
  curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
  curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTP_CONTENT_DECODING, false);
  $source = curl_exec( $ch );
  $info = curl_getinfo($ch);
  curl_close( $ch );
  file_put_contents( $imageName, $source );
  </code></pre>
  
  <p>I am not able to open the file, when I tried to open it with sublime, it is stuck at Loading Image. When I open it with notepad, I got the following that looks like PNG image, but it is not a valid image. File starts with 
      �PNG</p>
  
  <pre><code>IHDR       �   q�I�    IDATx�k�]�u�o��(��_�M��m�8:���_r�G
  </code></pre>
  
  <p>You can see the file here: <a href="https://gofile.io/?c=cfsYf2" rel="nofollow noreferrer">https://gofile.io/?c=cfsYf2</a></p>
  
  <p>Looks like the problem is making the curl request through Scrapestack, because if I point the curl to image url directly, the image is downloaded correctly, like below:</p>
  
  <pre><code>$image ="https://i.imgur.com/Cbiu8Ef.png";
  </code></pre>