title: php get curl posted data
body: <p>I am calling a php api via curl </p>
  
  <pre><code>ncServerURL='http://myserver/acertify.php'
    # binaryptr = open('sampleamex.xml','rb').read()
    # print binaryptr
    c = pycurl.Curl()
    c.setopt(pycurl.URL, ncServerURL)
    c.setopt(pycurl.POST, 1)
    c.setopt(pycurl.SSL_VERIFYPEER, 0)
    c.setopt(pycurl.SSL_VERIFYHOST, 0)
    header=["Content-type: text/xml","SOAPAction:run",'Content-Type: text/xml; charset=utf-8','Content-Length: '+str(len(xmldata))]
    # print header
    c.setopt(pycurl.HTTPHEADER, header)
    c.setopt(pycurl.POSTFIELDS, "xml="+str(xmldata))
    import StringIO
    b = StringIO.StringIO()
    c.setopt(pycurl.WRITEFUNCTION, b.write)
    c.perform()
    ncServerData = b.getvalue()
    return ncServerData
  </code></pre>
  
  <p>and posting xml data. in acertify.php and i am not able to xml data in php files , i am working on a project , what i don't know in this , how can i get curl posted data in this file .</p>
  
  <pre><code>&lt;?php
  
  echo "hi";
  print_r($_SESSION);
  print_r($_POST);
  // print_r($_FILES);
  
  ?&gt;
  </code></pre>