title: Grabbing image with cURL php
body: <p>Trying to save image to my server using cURL.  The image appears to download.  It shows the correct bytes but when i link image does not work.  I then DL to see and nope its a blank image.</p>
  
  <p>here is my code... whats the issue with it?</p>
  
  <pre><code>$ch = curl_init("'. $image .'");
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
  $rawdata=curl_exec ($ch);
  curl_close ($ch);
  
  $fp = fopen("$rename.jpg",'w');
  fwrite($fp, $rawdata); 
  fclose($fp);
  </code></pre>