title: Handling a space in a get parameter
body: <p>I am using a command like</p>
  
  <pre><code> $page = file_get_contents($url);
  </code></pre>
  
  <p>where </p>
  
  <pre><code>$url = "http://www.site.com/search/index.cfm?tab=names&amp;workername=firstname lastname";
  </code></pre>
  
  <p>When the url is typed directly in the browser chrome adds a <code>%20</code> in between firstname and lastname and the website handles things properly.</p>
  
  <p>However when I use $url with a space, file_get_contents grabs only results that match the firstname and isn't aware that <code>workername = "firstname lastname"</code></p>
  
  <p>When I explicitly add "%20" in between it returns <code>NULL</code>...</p>
  
  <p>What's the work around?</p>
  
  <p>Thanks guys!</p>