title: sending xml string using php curl but not as post parameter
body: <p>:)
  I'm trying to send an XML using curl but not as post parameter. what I mean is this.</p>
  
  <p>for example.</p>
  
  <p>the receiving side of that XML won't be able to recieve the XML using <code>$_POST</code> variable.</p>
  
  <p>he will need to use the following code:</p>
  
  <pre><code>    $xmlStr=null;
      $file=fopen('php://input','r');
      $xmlStr=fgets($file);
  </code></pre>
  
  <p>I want to be able to send an xml string using curl via https.</p>
  
  <p>so the following would be wrong:</p>
  
  <pre><code>public static function HttpsNoVerify($url,$postFields=null,$verbose=false) {
      // Initialize session and set URL.
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, $url);
  
      // Set so curl_exec returns the result instead of outputting it.
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      if ($postFields !=null) {
          curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
      }
      if ($verbose) {
          curl_setopt($ch, CURLOPT_VERBOSE, 1);
      }
      // Get the response and close the channel.
      $response = curl_exec($ch);
      curl_close($ch);
      return $response;
  }
  </code></pre>
  
  <p>because here i can use <code>HttpsNoVerify($url,array('xml_file'=&gt;'xml..'));</code> and that 
  will paste it as post parameter. and i want it as post output.</p>
  
  <p>so please I hope i explained myself properly and I explained exactly what I don't want to do.</p>
  
  <p>how can I do what i want to do?</p>
  
  <p>thanks! :)</p>
  
  <p>kfir</p>