title: cURL-ed image remains 0 bytes
body: <p>I am using cURL to retrieve an image, rename it and store it locally.
  The images comes up as 0 byte file, no matter, whether I use cURL, like so:</p>
  
  <pre><code>$strImageUrl = curl_init($strImageUrlSource);
  $fp = fopen($strTargetImage, 'wb');
  curl_setopt($strImageUrl, CURLOPT_FILE, $fp);
  curl_setopt($strImageUrl, CURLOPT_HEADER, 0);
  curl_exec($strImageUrl);
  curl_close($strImageUrl);
  fclose($fp);
  </code></pre>
  
  <p>or file_put/get. like so:</p>
  
  <pre><code>file_put_contents($strImageName, file_get_contents($strImageUrlSource));
  </code></pre>
  
  <p>The URL I am retrieving is: </p>
  
  <blockquote>
    <p>&lt;img src='http://i1.au.reastatic.net/150x112/73fa6c02a92d60a76320d0e89dfbc1a36a6e46c818f74772dec65bae6959c62f/main.jpg' width="150" height="112" alt="Wondecla, address available on request" title="Wondecla, address available on request" /></p>
  </blockquote>
  
  <p>I can save this image properly manually.
  When looking at the properties in FireFox it shows three entries:</p>
  
  <pre><code>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABYBAMAAACDuy0HAAAAG1BMVEX+/v4BAQH///8KCgoDAwN/f3/19fWAgID8... etc
  </code></pre>
  
  <p><a href="http://i1.au.reastatic.net/150x112/73fa6c02a92d60a76320d0e89dfbc1a36a6e46c818f74772dec65bae6959c62f/main.jpg" rel="nofollow">http://i1.au.reastatic.net/150x112/73fa6c02a92d60a76320d0e89dfbc1a36a6e46c818f74772dec65bae6959c62f/main.jpg</a></p>
  
  <pre><code>data:image/png;base64,iVBORw0KG ... etc.
  </code></pre>
  
  <p>What am I doing wrong here?</p>