title: post curl into any file from my server get code 400
body: <p>I got a new server. I wanted to check if the curl works so I've made 2 files - one that does print_r($_SERVER), and the other that does curl to the first file:</p>
  
  <pre><code>&lt;?php
   error_reporting('E_ALL');
  $url = $_SERVER['HTTP_HOST'] . '/printServer.php';
  $curl = curl_init();
  
  curl_setopt_array($curl, array(
      CURLOPT_RETURNTRANSFER =&gt; 1,
      CURLOPT_URL =&gt; $url,
      CURLOPT_POST =&gt; 1 ));
  
  $content = curl_exec($curl);
  
  print $content;
  
  ?&gt;
  </code></pre>
  
  <p>and the outcome is</p>
  
  <blockquote>
    <p>Bad Request Your browser sent a request that this server could not
    understand. Additionally, a 400 Bad Request error was encountered
    while trying to use an ErrorDocument to handle the request.</p>
  </blockquote>
  
  <p>When I change this curl to be get - it does work...
  Can anyone help me?</p>
  
  <p>Thanks.</p>