title: Cannot get XML output through cURL
body: <p>I am using PHP cURL to fetch XML output from a URL. Here is what my code looks like:</p>
  
  <pre><code>$ch = curl_init(); 
  curl_setopt($ch, CURLOPT_URL, 'http://www.mydomain.com?querystring'); 
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  curl_setopt($ch, CURLOPT_USERPWD, "username:password");
  $store = curl_exec($ch);
  echo $store;
  curl_close($ch);
  </code></pre>
  
  <p>But, instead of returning the XML it just shows my 404 error page. If I type the URL <a href="http://www.mydomain.com?querystring" rel="nofollow">http://www.mydomain.com?querystring</a> in the web browser I can see the XML in the browser.</p>
  
  <p>What am I missing here? :(</p>
  
  <p>Thanks.</p>