title: use file_put_contents for download image
body: <p>I'd like use <code>file_put_contents</code> to download and create many types (different sizes) of images from an URL (Facebook and Twitter).</p>
  
  <p>My script looks like this:</p>
  
  <pre><code>$image = $user-&gt;getAvatarSocial(); 
  //image like: =&gt; https://abs.twimg.com/sticky/default_profile_images/default_profile_4.png
  file_put_contents($image, file_get_contents('php://input'));
  </code></pre>
  
  <p>But I receive this error:</p>
  
  <blockquote>
    <p>Warning:
    fopen(<a href="http://abs.twimg.com/sticky/default_profile_images/default_profile_4.png" rel="nofollow">http://abs.twimg.com/sticky/default_profile_images/default_profile_4.png</a>):
    failed to open stream: HTTP wrapper does not support writeable
    connections</p>
  </blockquote>
  
  <p>I'm using Symfony 2.3.7.</p>