title: php - file_get_contents - Downloading files with spaces in the filename not working
body: <p>I am trying to download files using <a href="http://php.net/file_get_contents" rel="noreferrer"><code>file_get_contents()</code></a> function.
  However if the location of the file is <code>http://www.example.com/some name.jpg</code>, the function fails to download this.</p>
  
  <p>But if the URL is given as <code>http://www.example.com/some%20name.jpg</code>, the same gets downloaded.</p>
  
  <p>I tried <a href="http://php.net/rawurlencode" rel="noreferrer"><code>rawurlencode()</code></a> but this coverts all the characters in the URL and the download fails again.</p>
  
  <p>Can someone please suggest a solution for this?</p>