title: php curl posting to server where script is hosted doesn't work
body: <p>I'm trying to use curl to post data to a script which is posted on the same server however it gives me this error:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
   &lt;head&gt;
    &lt;title&gt;401 - Unauthorized&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
    &lt;h1&gt;401 - Unauthorized&lt;/h1&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It works fine on localhost, what settings do I need to change to make it work on the server though? </p>