title: How to resolve HTTP/1.1 400 Bad Request
body: <p>All,</p>
  
  <p>I am accessing a web-page through command prompt using simple_html_dom in php as</p>
  
  <pre><code>  $page = file_get_html($url, false, $context); 
  </code></pre>
  
  <p>where $url is the web-URL.
  If you URL is like <a href="http://abc.com/xyz.html?s=" rel="nofollow">http://abc.com/xyz.html?s=</a>"sometext"
  Then i am getting proper response. 
  But I am getting HTTP/1.1 400 Bad Request if the URL has white space in the get parameter like <a href="http://abc.com/xyz.html?s=" rel="nofollow">http://abc.com/xyz.html?s=</a>"some text". </p>
  
  <p>Can anyone please help me how to resolve this issue. </p>
  
  <p>Thanks in advance.</p>