title: How to escape url for fopen
body: <p>It looks like fopen can't open files with spaces. 
  For example: </p>
  
  <pre><code>$url = 'http://gatewaypeople.com/images/articles/cntrbutnssttmnts12_main 616x200.jpg';
  fopen($url, 'r'); 
  </code></pre>
  
  <p>returns false (mind the space in the url), but file is accessible by browsers. 
  I've also tried to escape the url by <code>urlencode</code> and <code>rawurlencode</code> with no luck. How to properly escape the spaces? </p>